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

Hannu Koivisto <[email protected]> Wed, 12 Feb 2003 14:35:13 +0200
Newsgroups gmane.lisp.ilisp.general
Message-ID <[email protected]>
Torsten Anders <[email protected]> writes:

> My problem is related to the font-lock-mode for lisp-mode, no idea
> whether this is influenced by ilisp. Anyway, I do believe some people
> here came across the same issue.

It should not be influenced by ILISP, this is an Emacs issue.

> I am used to put some tests calls in my code (commented out). So I
> surround them by #| and |#. Emacs colours multi-line comments properly
> as long as they only contain text. But as soon as I put code in the
> comment (i.e. a line starting with an open parenthesis), the colouring
> becomes, well, strange (i.e. rather complicated behaviour). E.g., 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.

> I read in the Emacs doc that an open parenthesis always starts a new
> code block (e.g. a defun). 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.

> PS: I am running GNU-Emacs 21.2 and ilisp-5.12.0 on a RH 8.0 Linux box

Emacs 21.2 here as well, ILISP is a bit later than 5.12 but that
shouldn't make a difference.

-- 
Hannu
Please don't send copies of list mail


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