From: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: Font Lock Problems
Date: Thu, 23 Oct 2003 14:21:38 GMT [thread overview]
Message-ID: <jwvu160xcs6.fsf-monnier+gnu.emacs.help@vor.iro.umontreal.ca> (raw)
In-Reply-To: m3vfqgfs6q.fsf@ate.maierh
> 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.
Stefan
next prev parent reply other threads:[~2003-10-23 14:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-21 15:31 Font Lock Problems Phillip Lord
2003-10-21 16:11 ` Stefan Monnier
2003-10-21 17:08 ` Phillip Lord
2003-10-21 20:03 ` Stefan Monnier
2003-10-22 13:44 ` Phillip Lord
2003-10-22 14:10 ` Stefan Monnier
2003-10-22 15:09 ` Phillip Lord
2003-10-23 15:49 ` Phillip Lord
2003-10-23 5:18 ` Harald Maier
2003-10-23 14:21 ` Stefan Monnier [this message]
2003-10-23 15:53 ` Harald Maier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvu160xcs6.fsf-monnier+gnu.emacs.help@vor.iro.umontreal.ca \
--to=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.