From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Harald Maier Newsgroups: gmane.emacs.help Subject: Re: Font Lock Problems Date: Thu, 23 Oct 2003 17:53:54 +0200 Organization: 1&1 Internet AG Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: Reply-To: Harald Maier NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1066925616 19671 80.91.224.253 (23 Oct 2003 16:13:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 23 Oct 2003 16:13:36 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 23 18:13:33 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1ACi5c-00072Y-00 for ; Thu, 23 Oct 2003 18:13:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AChvW-0008M0-Fz for geh-help-gnu-emacs@m.gmane.org; Thu, 23 Oct 2003 12:03:06 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!npeer.de.kpn-eurorings.net!rz.uni-karlsruhe.de!feed.news.schlund.de!schlund.de!news.online.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 37 Original-NNTP-Posting-Host: p5088e3c1.dip0.t-ipconnect.de Original-X-Trace: online.de 1066924434 23165 80.136.227.193 (23 Oct 2003 15:53:54 GMT) Original-X-Complaints-To: abuse@einsundeins.com Original-NNTP-Posting-Date: Thu, 23 Oct 2003 15:53:54 +0000 (UTC) User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:wpmWmfFJ7Nlf0jmiyisQ5ePGHJ0= Original-Xref: shelby.stanford.edu gnu.emacs.help:117558 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:13490 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:13490 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. Harald