Re: [OT?] multi-line comment font-lock problem for lisp-mode

Marco Antoniotti <[email protected]> Wed, 12 Feb 2003 10:07:15 -0500
Newsgroups gmane.lisp.ilisp.general
Message-ID <[email protected]>
It is definitively a font lock problem.

I still see it.  I guess Hannu has a more recent version of Emacs or a 
better setup than mine.

Cheers

marco


On Wednesday, Feb 12, 2003, at 09:44 America/New_York, Torsten Anders 
wrote:

> Dear Hannu,
>
> Thanks for your reaction!
>
> On Wed, 2003-02-12 at 12:35, Hannu Koivisto wrote:
>> Torsten Anders <[email protected]> writes:
>>> I am used to put some tests calls in my code (commented out),
>>> surround them by #| and |#. [...]
>>> all code after the multi-line comment (i.e. starting with the the | 
>>> in |#)
>>> is coloured in string face (up the the next |).
>>
>> I could not reproduce the problem given this description.  A piece
>> of code such as this...
>>
>> (defun foo ()
>>   t)
>>
>> #|
>> (defun foo ()
>>   t)
>> (defparameter *hop* 1)
>> |#
>>
>> (defun foo ()
>>   t)
>>
>> ...gets fontified just fine.  This does not, of course, mean that
>> the problem does not exist.  It may be that I have seen a similar
>> problem as well, but I cannot remember for sure.
>
> Sorry for not giving an example myself.
>
> As I said, the behaviour is a bit strange. Your little code fontifies
> fine here as well. But just add a newline between the two expressions
> commented out, and you probably see what I am speaking about.
>
>
> (defun foo ()
>   t)
>
> #|
> (defun foo ()
>   t)
>
> (defparameter *hop* 1)
> |#
>
> (defun foo ()
>   t)
>
> Now remove this newline again: colouring does not change back.
>
> Now, you might argue: OK, just use only a single expression per 
> comment.
> But change anything in the comment (e.g. add a space) and wait a few
> seconds...
>
> (defun foo ()
>   t)
>
> #|
> (defun foo (x)
>   (+ x
>      x)
> |#
>
> (defun foo ()
>   t)
>
> Or try a more complex comment (just some arbitrary code...):
>
> (defun foo ()
>   t)
>
> #|
> (defun convert-to-package (form from-package to-package)
>   (if (eq (find-package from-package) (find-package to-package))
>     form
>     (cond ((null form) nil)
>           ((listp form)
>            (loop for item in form
>                  collect  (convert-to-package item from-package
> to-package)))
>           ((constantp form) form)
>           ((symbolp form)
>            (if (eq (symbol-package form)
>                    (find-package from-package))
>              (intern (symbol-name form) to-package)    ; converts it to
> to-package
>              form))                       ; pass it unchanged otherwise
>           (T (error "Do not know how to handle ~A" form)))))
> |#
>
> (defun foo ()
>   t)
>
>
>
>>> Is there some way to switch of this behaviour?
>>
>> There is open-paren-in-column-0-is-defun-start but you may find
>> that it does not fix everything.
>
> Tried to set the variable nil, but I do not see any effect for the
> problem stated.
>
> Anyway, thanks for reacting!
>
> Regards,
> Torsten
>
> -- 
> Torsten Anders <[email protected]>
>
>
>
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> _______________________________________________
> Ilisp-help mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ilisp-help
>
--
Marco Antoniotti
NYU Courant Bioinformatics Group		tel. +1 - 212 - 998 3488
715 Broadway 10th FL				fax. +1 - 212 - 998 3484
New York, NY, 10003, U.S.A.



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com