From: Surendra Singhi
Subject: #| comenting style |#
Date: 
Message-ID: <cot438$q87$1@news.asu.edu>
Hi,
Is this #| comenting style |# still used?

It was giving me some problems in clisp and xemacs.


-- 
Surendra Singhi

www.public.asu.edu/~sksinghi

From: Philip Haddad
Subject: Re: #| comenting style |#
Date: 
Message-ID: <ba57c4f9.0412041859.7ab467d5@posting.google.com>
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
From: Harald Hanche-Olsen
Subject: Re: #| comenting style |#
Date: 
Message-ID: <pco4qj1kctu.fsf@shuttle.math.ntnu.no>
+ 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
From: Pascal Bourguignon
Subject: Re: #| comenting style |#
Date: 
Message-ID: <87pt1p74pd.fsf@thalassa.informatimago.com>
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.
From: Ivan Boldyrev
Subject: Re: #| comenting style |#
Date: 
Message-ID: <t59a82xdpl.ln2@ibhome.cgitftp.uiggm.nsc.ru>
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.
From: ···············@yahoo.com
Subject: Re: #| comenting style |#
Date: 
Message-ID: <1102355679.178737.243100@z14g2000cwz.googlegroups.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 #|.
From: Harald Hanche-Olsen
Subject: Re: #| comenting style |#
Date: 
Message-ID: <pco1xe3rslh.fsf@shuttle.math.ntnu.no>
+ ···············@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
From: Surendra Singhi
Subject: Re: #| comenting style |#
Date: 
Message-ID: <cp3dcq$raj$1@news.asu.edu>
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
From: Ivan Boldyrev
Subject: Re: #| comenting style |#
Date: 
Message-ID: <q69i82x322.ln2@ibhome.cgitftp.uiggm.nsc.ru>
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
From: Harald Hanche-Olsen
Subject: Re: #| comenting style |#
Date: 
Message-ID: <pco8y89nk6v.fsf@shuttle.math.ntnu.no>
+ 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
From: Brian Palmer
Subject: Re: #| comenting style |#
Date: 
Message-ID: <0whk6rnphhi.fsf@rescomp.stanford.edu>
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.
From: Tim Bradshaw
Subject: Re: #| comenting style |#
Date: 
Message-ID: <ey3sm6hxfhb.fsf@cley.com>
* 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