Surendra Singhi <·········@netscape.net> wrote in message news:<············@news.asu.edu>...
> Hi,
> Is this #| comenting style |# still used?
>
> It was giving me some problems in clisp and xemacs.
Still works for me.
--
Certum qoud factum.
Philip Haddad
+ Surendra Singhi <·········@netscape.net>:
| Is this #| comenting style |# still used?
Sure. It's the easiest way to comment out a sizable portion of code.
However, most Lisp programmers seem to prefer the ;;; style even for
comments spanning pages.
| It was giving me some problems in clisp and xemacs.
I don't see why it should make problems for clisp. Any conforming
implementation must support it. I have noticed that font-lock-mode in
emacs has trouble with it though, which seems to be because it only
looks at a limited number of lines around the present position. If
the initial #| is too far back, font-lock-mode doesn't see it, and
fails to highlight the text as a comment.
--
* Harald Hanche-Olsen <URL:http://www.math.ntnu.no/~hanche/>
- Debating gives most of us much more psychological satisfaction
than thinking does: but it deprives us of whatever chance there is
of getting closer to the truth. -- C.P. Snow
Harald Hanche-Olsen <······@math.ntnu.no> writes:
> | It was giving me some problems in clisp and xemacs.
>
> I don't see why it should make problems for clisp. Any conforming
> implementation must support it. I have noticed that font-lock-mode in
> emacs has trouble with it though, which seems to be because it only
> looks at a limited number of lines around the present position. If
> the initial #| is too far back, font-lock-mode doesn't see it, and
> fails to highlight the text as a comment.
That's why you can write: #|| comment ||#
but indentation and font-lock could still get some help in processing
long comments and strings...
--
__Pascal Bourguignon__ http://www.informatimago.com/
The world will now reboot; don't bother saving your artefacts.
On 8949 day of my life Harald Hanche-Olsen wrote:
> | It was giving me some problems in clisp and xemacs.
>
> I don't see why it should make problems for clisp. Any conforming
> implementation must support it. I have noticed that font-lock-mode in
> emacs has trouble with it though, which seems to be because it only
> looks at a limited number of lines around the present position. If
> the initial #| is too far back, font-lock-mode doesn't see it, and
> fails to highlight the text as a comment.
There is another problem: if there is a `(' at first position in line
inside a comment, Emacs thinks that it is start of some top-level form
and ends comment prematurely. It is documented misfeature of Emacs:
see (info "(emacs)Left Margin Paren")
--
Ivan Boldyrev
Assembly of a Japanese bicycle requires greatest peace of spirit.
Harald Hanche-Olsen wrote:
> I have noticed that font-lock-mode in
> emacs has trouble with it though, which seems to be because it only
> looks at a limited number of lines around the present position. If
> the initial #| is too far back, font-lock-mode doesn't see it, and
> fails to highlight the text as a comment.
I recently figured out how to solve this:
M-x font-lock-fontify-buffer
Emacs doesn't do this by default because it can be slow. And there are
still minor problems coloring #|.
+ ···············@yahoo.com:
| Harald Hanche-Olsen wrote:
| > I have noticed that font-lock-mode in
| > emacs has trouble with it though, which seems to be because it only
| > looks at a limited number of lines around the present position. If
| > the initial #| is too far back, font-lock-mode doesn't see it, and
| > fails to highlight the text as a comment.
|
| I recently figured out how to solve this:
|
| M-x font-lock-fontify-buffer
|
| Emacs doesn't do this by default because it can be slow. And there are
| still minor problems coloring #|.
Ugh. Major problems, methinks. At least, it seems so: I just took a
copy of a good long Common Lisp file, inserted #| between two forms
early in the file, and |# betwwen two forms late in the file. Then I
ran font-lock-fontify-buffer. Result: Three forms following #| are
coloured as a comment. Later forms are coloured as code. But much
stranger is that 11 lines /after/ |# are coloured as a string! This
includes some comment lines using the ;;; style plus half a defun
following the comments. This code is clearly badly broken. (This is
GNU Emacs 21.3.)
Oh, and BTW I have (setf font-lock-maximum-size 1024000) in my .emacs,
nothing else font-lock-related there.
--
* Harald Hanche-Olsen <URL:http://www.math.ntnu.no/~hanche/>
- Debating gives most of us much more psychological satisfaction
than thinking does: but it deprives us of whatever chance there is
of getting closer to the truth. -- C.P. Snow
Harald Hanche-Olsen wrote:
> + ···············@yahoo.com:
>
> | Harald Hanche-Olsen wrote:
> | > I have noticed that font-lock-mode in
> | > emacs has trouble with it though, which seems to be because it only
> | > looks at a limited number of lines around the present position. If
> | > the initial #| is too far back, font-lock-mode doesn't see it, and
> | > fails to highlight the text as a comment.
> |
> | I recently figured out how to solve this:
> |
> | M-x font-lock-fontify-buffer
> |
> | Emacs doesn't do this by default because it can be slow. And there are
> | still minor problems coloring #|.
>
> Ugh. Major problems, methinks. At least, it seems so: I just took a
> copy of a good long Common Lisp file, inserted #| between two forms
> early in the file, and |# betwwen two forms late in the file. Then I
> ran font-lock-fontify-buffer. Result: Three forms following #| are
> coloured as a comment. Later forms are coloured as code. But much
> stranger is that 11 lines /after/ |# are coloured as a string! This
> includes some comment lines using the ;;; style plus half a defun
> following the comments. This code is clearly badly broken. (This is
> GNU Emacs 21.3.)
>
> Oh, and BTW I have (setf font-lock-maximum-size 1024000) in my .emacs,
> nothing else font-lock-related there.
>
I also faced similar syntax highlighting problems in Xemacs 21.13, I
posted this on Xemacs newsgroup too, but didn't get much response. I
will try to recreate the bug which I was facing in clisp, and report it
here.
--
Surendra Singhi
www.public.asu.edu/~sksinghi
On 8951 day of my life Harald Hanche-Olsen wrote:
> Ugh. Major problems, methinks. At least, it seems so: I just took a
> copy of a good long Common Lisp file, inserted #| between two forms
> early in the file, and |# betwwen two forms late in the file. Then I
> ran font-lock-fontify-buffer. Result: Three forms following #| are
> coloured as a comment. Later forms are coloured as code.
Again: see (info "(emacs)Left Margin Paren")
Does any one sees my messages?
--
Ivan Boldyrev
| recursion, n:
| See recursion
+ Ivan Boldyrev <···············@cgitftp.uiggm.nsc.ru>:
| Again: see (info "(emacs)Left Margin Paren")
|
| Does any one sees my messages?
Yes, I saw it, but it slid right off my teflon brain the first time
around. This time I turned up the heat so it will stick anyhow.
Thanks.
--
* Harald Hanche-Olsen <URL:http://www.math.ntnu.no/~hanche/>
- Debating gives most of us much more psychological satisfaction
than thinking does: but it deprives us of whatever chance there is
of getting closer to the truth. -- C.P. Snow
Harald Hanche-Olsen <······@math.ntnu.no> writes:
> Ugh. Major problems, methinks. At least, it seems so: I just took a
> copy of a good long Common Lisp file, inserted #| between two forms
> early in the file, and |# betwwen two forms late in the file. Then I
> ran font-lock-fontify-buffer. Result: Three forms following #| are
> coloured as a comment. Later forms are coloured as code. But much
> stranger is that 11 lines /after/ |# are coloured as a string! This
> includes some comment lines using the ;;; style plus half a defun
> following the comments. This code is clearly badly broken. (This is
> GNU Emacs 21.3.)
font-lock is a monstrosity in x?emacs; newer editors seem to handle
syntax highlighting much better. Thankfully, I believe that's a goal
for the release-after-next of xemacs, to tackle fontification issues.
--
I'm awfully glad I'm a Beta, because I don't work so hard.
* Harald Hanche-Olsen wrote:
> I don't see why it should make problems for clisp. Any conforming
> implementation must support it. I have noticed that font-lock-mode in
> emacs has trouble with it though, which seems to be because it only
> looks at a limited number of lines around the present position. If
> the initial #| is too far back, font-lock-mode doesn't see it, and
> fails to highlight the text as a comment.
I only use #| ... |# comments for commenting out code, and then I
generally don't want the editor to notice that it's a comment. The
traditional trick for this is #|| ... ||# which fools most emacs-style
editors.
--tim