From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: font-lock-comment-delimiter-face Date: Wed, 11 May 2005 15:51:01 -0400 Message-ID: <87acn15z2i.fsf-monnier+emacs@gnu.org> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1115841199 2921 80.91.229.2 (11 May 2005 19:53:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 11 May 2005 19:53:19 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 11 21:53:18 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DVxFV-0006kE-R5 for ged-emacs-devel@m.gmane.org; Wed, 11 May 2005 21:52:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DVxHg-0001mT-A3 for ged-emacs-devel@m.gmane.org; Wed, 11 May 2005 15:54:20 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DVxH6-0001hw-KR for emacs-devel@gnu.org; Wed, 11 May 2005 15:53:44 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DVxH0-0001f3-S9 for emacs-devel@gnu.org; Wed, 11 May 2005 15:53:39 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DVxH0-0001eb-Pl for emacs-devel@gnu.org; Wed, 11 May 2005 15:53:38 -0400 Original-Received: from [209.226.175.184] (helo=tomts22-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DVxL0-0007g6-Rz; Wed, 11 May 2005 15:57:47 -0400 Original-Received: from alfajor ([67.68.217.114]) by tomts22-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20050511195104.QQTL21470.tomts22-srv.bellnexxia.net@alfajor>; Wed, 11 May 2005 15:51:04 -0400 Original-Received: by alfajor (Postfix, from userid 1000) id 45609D72FF; Wed, 11 May 2005 15:51:01 -0400 (EDT) Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Wed, 11 May 2005 12:25:45 -0400") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:36995 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36995 > Seems odd to introduce a new face whose name refers to "comment" even > though the only two known uses for it are not for comments but for > email citations. > Those were the only uses yet implemented for it, > but now I've changed font-lock-fontify-syntactically-region > to use it for comment delimiters. I think this will work > for all modes. It works for C mode and Lisp mode. For C++ mode, it doesn't quite work: foo // comment1 bar /* comment2 */ The // and /* are put in font-lock-comment-delimiter-face (which I find to be useless clutter and makes the text less legible without helping understand the structure), but the */ is left with just font-lock-comment-face. In SML mode I see another problem: (* comment 1 start (* nested comment *) comment 1 end *) The first (* is in f-l-c-d-f, the second isn't. That's correct. OTOH depending on how the text is refontified, not only the second *) but sometimes also the first *) gets the new f-l-c-d-f. > It would be cleaner, in some ways, to use font-lock-comment-face for > the delimiters and use font-lock-comment-text-face for the comment > contents. The improvement is that this would not involve any change > in what font-lock-comment-face looks like. It would just involve > adding font-lock-comment-text-face and using it. I don't understand the above. In what way does the current code change what font-lock-comment-face looks like? > However, the method that works in font-lock-fontify-syntactically-region > for font-lock-comment-delimiter-face does not work when adapted to > font-lock-comment-text-face. I can't figure out why, > but it seems to relate to jit-lock. Here also, I seem to be missing something. Stefan "who dislikes this new gaudier font-locking, again for the same reason that it is lexical rather than syntactic highlighting"