From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Separating // and /**/ comment fontification Date: Wed, 15 Jun 2005 01:30:06 -0400 Organization: Bell Sympatico Message-ID: <87y89cw5n9.fsf-monnier+gnu.emacs.help@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 1118814319 31962 80.91.229.2 (15 Jun 2005 05:45:19 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 15 Jun 2005 05:45:19 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jun 15 07:45:17 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DiQhu-0003hD-HZ for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Jun 2005 07:44:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DiQn3-0006dR-Ua for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Jun 2005 01:50:17 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!border1.nntp.dca.giganews.com!nntp.giganews.com!wns13feed!worldnet.att.net!207.35.177.252!nf3.bellglobal.com!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:N/OEse6+loxhYI+jxLC3n87Jzgw= Original-Lines: 19 Original-NNTP-Posting-Host: 70.48.82.205 Original-X-Complaints-To: abuse@sympatico.ca Original-X-Trace: news20.bellglobal.com 1118813407 70.48.82.205 (Wed, 15 Jun 2005 01:30:07 EDT) Original-NNTP-Posting-Date: Wed, 15 Jun 2005 01:30:07 EDT Original-Xref: shelby.stanford.edu gnu.emacs.help:132007 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:27477 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:27477 > (setq font-lock-syntactic-face-function > (lambda (state) > (if (nth 3 state) font-lock-string-face > (if (nth 7 state) font-lock-other-comment-face > font-lock-comment-face)))) > and that should do what I want. Though on first attempt it doesn't seem to. Make sure you have a variable `font-lock-other-comment-face' whose value is a symbol (a face). Or otherwise try (setq font-lock-syntactic-face-function (lambda (state) (if (nth 3 state) font-lock-string-face (if (nth 7 state) 'font-lock-other-comment-face font-lock-comment-face)))) -- Stefan