From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: bj Newsgroups: gmane.emacs.help Subject: Re: syntax highlighting for comments Date: Tue, 15 Sep 2009 09:49:05 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <42fdb144-4df2-4489-9842-243504e404d0@a7g2000yqo.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1253036448 25854 80.91.229.12 (15 Sep 2009 17:40:48 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Sep 2009 17:40:48 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Sep 15 19:40:41 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mnc1A-0003mb-H8 for geh-help-gnu-emacs@m.gmane.org; Tue, 15 Sep 2009 19:40:40 +0200 Original-Received: from localhost ([127.0.0.1]:51148 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mnc19-0000Vd-LP for geh-help-gnu-emacs@m.gmane.org; Tue, 15 Sep 2009 13:40:39 -0400 Original-Path: news.stanford.edu!usenet.stanford.edu!newsfeed.news2me.com!nx02.iad01.newshosting.com!newshosting.com!69.16.185.21.MISMATCH!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!postnews.google.com!d4g2000vbm.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 35 Original-NNTP-Posting-Host: 80.75.192.70 Original-X-Trace: posting.google.com 1253033346 14755 127.0.0.1 (15 Sep 2009 16:49:06 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 15 Sep 2009 16:49:06 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: d4g2000vbm.googlegroups.com; posting-host=80.75.192.70; posting-account=m5mUNAoAAACclRRo3KuF4zL6ydgW80wn User-Agent: G2/1.0 X-HTTP-Via: 1.0 chbad-s-sa1px01.ch.abb.com:8080 (squid/2.5.STABLE12) X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729),gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:173043 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:68163 Archived-At: any idea? On 8 Set, 10:26, gento wrote: > Hi All, > > I'm using emacs to edit journal text files *.jou, for which commented > lines > start with the character "/". > > I apply the comment syntax for the "*.jou" files by adding to > the .emacs file > the lines > > (add-hook 'find-file-hooks > =A0(lambda () > =A0 (when (string-match "\\.jou$" (buffer-file-name)) > =A0 =A0(setq comment-start "/") > =A0 ) > =A0) > ) > > Now I would also like to turn the text of the commented lines into > red, and for this > I added the line > > (font-lock-add-keywords nil '("\\(/.*\\)$" (1 font-lock-comment- > face))) > > which unfortunately doesn=92t work. > > Does anybody know where the mistake is? > Many thanks > > gento