[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Font Lock Problems

From: Harald Maier
Subject: Re: Font Lock Problems
Date: Thu, 23 Oct 2003 17:53:54 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

Stefan Monnier <> writes:

>> Should I here for explicitly change the syntax table or is it
>> enough to set the 'comment-start' and 'comment-end' variables? Or
>> should I not confuse the variable 'comment-start' and the
>> 'comment-start sequence' syntax table entries.  If this is so for
>> what purposes do I need the variable 'comment-start' and
>> 'comment-end'. Do I need 'comment-start' and 'comment-end' maybe
>> for fill-paragraph.
> The comment-start and comment-end variables are used by things like
> newcomment (i.e. comment-region, auto-fill, ...).  The
> syntax-table's comment markers are used by things like forward-sexp,
> font-lock, and also newcomment.el (though it still requires the
> comment-start and comment-end things as well).
> The default filling code (which is separate from auto-fill) does not
> know about comments at all.  In Emacs-CVS, this has been improved a
> little, so that it now uses comment-start (as well as syntax-tables
> sometimes), but only for \n-terminated comments and it doesn't work
> right in all circumstances.
> I.e. you need to set both the variables and the syntax-table and if
> you want fill-paragraph to pay attention to comments, you either
> need to use Emacs-CVS or to write your own fill-paragraph-function.
> Take a look at the lisp-paragraph-function used in lisp-mode for an
> example (it is the function that got generalized and moved to
> fill.el in Emacs-CVS).
> This is an area that still requires a good deal of improvement, as
> you can see.

Thanks Stefan,

good answer. That's what I am looking for.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]