From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: bcbarnes@gmail.com Newsgroups: gmane.emacs.help Subject: Re: need help customizing font-lock colors in syntax highlighting (fortran) Date: Tue, 1 Apr 2008 08:54:38 -0700 (PDT) Organization: http://groups.google.com Message-ID: <2b906f9a-609c-4779-96fe-3e529fb90b96@p25g2000hsf.googlegroups.com> References: <99f4b8df-7ff4-4098-81b0-2d54b732cb74@t54g2000hsg.googlegroups.com> <4sprtaxcc5.fsf@xoc2.stanford.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1207068047 662 80.91.229.12 (1 Apr 2008 16:40:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Apr 2008 16:40:47 +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 Apr 01 18:41:16 2008 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 1JgjXr-0007YZ-Qn for geh-help-gnu-emacs@m.gmane.org; Tue, 01 Apr 2008 18:41:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JgjXF-0000o1-Mr for geh-help-gnu-emacs@m.gmane.org; Tue, 01 Apr 2008 12:40:33 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!p25g2000hsf.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 30 Original-NNTP-Posting-Host: 128.252.46.221 Original-X-Trace: posting.google.com 1207065279 31487 127.0.0.1 (1 Apr 2008 15:54:39 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 1 Apr 2008 15:54:39 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: p25g2000hsf.googlegroups.com; posting-host=128.252.46.221; posting-account=HBJhmAkAAAADpGfaGJQBh2RuRfcuUXG1 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_2; en-us) AppleWebKit/525.13 (KHTML, like Gecko) Version/3.1 Safari/525.13, gzip(gfe), gzip(gfe) Original-Xref: shelby.stanford.edu gnu.emacs.help:157575 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:52946 Archived-At: On Apr 1, 2:29=A0am, Glenn Morris wrote: > bcbar...@gmail.com wrote: > > In the old fortran mode filter, intrinsics such as mod, exp, and > > others would be highlighting in a different color (say, pink) than the > > control flow commands such as if/endif, do/enddo (which would be in > > purple). In the F90 mode, these commands are all highlighted in the > > same color. I find this to be undesirable, but I'm not sure how to > > change it. > > I don't really know why it is like it is, but it is. Anyway, add to > ~/.emacs: > > (eval-after-load "f90" > =A0 '(progn > =A0 =A0 =A0(setq f90-font-lock-keywords-3 > =A0 =A0 =A0 (append f90-font-lock-keywords-2 > =A0 =A0 =A0 =A0 =A0 (list > =A0 =A0 =A0 =A0 =A0 =A0f90-keywords-level-3-re > =A0 =A0 =A0 =A0 =A0 =A0f90-operators-re > =A0 =A0 =A0 =A0 =A0 =A0(list f90-procedures-re '(1 font-lock-builtin-face = keep)) > =A0 =A0 =A0 =A0 =A0 =A0"\\")) > =A0 =A0 =A0 f90-font-lock-keywords-4 (append f90-font-lock-keywords-3 > =A0 =A0 =A0 =A0 =A0 (list f90-hpf-keywords-re))))) Excellent, Glenn! That does exactly what I wanted. Tested in both emacs 22.1 and Aquamacs 1.3 / OS X. Thanks. -Brian