From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Font Lock Problems Date: Thu, 23 Oct 2003 14:21:38 GMT Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1066919489 3728 80.91.224.253 (23 Oct 2003 14:31:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 23 Oct 2003 14:31:29 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 23 16:31:27 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 1ACgUp-0007Ho-00 for ; Thu, 23 Oct 2003 16:31:27 +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 1ACgUe-0000Ht-UD for geh-help-gnu-emacs@m.gmane.org; Thu, 23 Oct 2003 10:31:16 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!newshub.sdsu.edu!cyclone.bc.net!snoopy.risq.qc.ca!charlie.risq.qc.ca!53ab2750!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 30 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Original-NNTP-Posting-Host: 132.204.24.42 Original-X-Complaints-To: abuse@umontreal.ca Original-X-Trace: charlie.risq.qc.ca 1066918898 132.204.24.42 (Thu, 23 Oct 2003 10:21:38 EDT) Original-NNTP-Posting-Date: Thu, 23 Oct 2003 10:21:38 EDT Original-Xref: shelby.stanford.edu gnu.emacs.help:117553 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:13485 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:13485 > 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