From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: Re: f90.el doesn't recognize elemental attribute for hiliting Date: Sat, 30 Mar 2002 20:47:54 +0000 Organization: None Sender: bug-gnu-emacs-admin@gnu.org Message-ID: References: <200203302038.g2UKcMF01267@fac13.ds.psu.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1017521299 22674 127.0.0.1 (30 Mar 2002 20:48:19 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 30 Mar 2002 20:48:19 +0000 (UTC) Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16rPlq-0005tb-00 for ; Sat, 30 Mar 2002 21:48:18 +0100 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16rPlm-0004On-00; Sat, 30 Mar 2002 15:48:14 -0500 Original-Received: from chx400.switch.ch ([130.59.10.2]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16rPlV-0004IR-00 for ; Sat, 30 Mar 2002 15:47:57 -0500 Original-Received: from pegasus.csx.cam.ac.uk ([131.111.8.69]) by chx400.switch.ch with esmtp (Exim 3.20 #1) id 16rPlT-0006Ks-00 for gnu-emacs-bug@moderators.isc.org; Sat, 30 Mar 2002 21:47:55 +0100 Original-Received: from news by pegasus.csx.cam.ac.uk with local (Exim 3.34 #1) id 16rPlS-0006D8-00 for gnu-emacs-bug@moderators.isc.org; Sat, 30 Mar 2002 20:47:54 +0000 Original-To: gnu-emacs-bug@moderators.isc.org Original-Path: not-for-mail Original-Newsgroups: gnu.emacs.bug Original-Lines: 48 Original-NNTP-Posting-Host: xpc21.ast.cam.ac.uk X-Attribution: GM User-Agent: Gnus/5.090005 (Oort Gnus v0.05) Emacs/21.2 (i686-pc-linux-gnu) Errors-To: bug-gnu-emacs-admin@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.0.8 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.bugs:316 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:316 Richard E Hawkins wrote: > recursive function mutation(thegene) > > will highlight both "recursive" and "function" properly. > > elemental function mutation(thegene) > > fails to highlight "elemental" The "elemental" specification is an F95 feature, so one could make a reasonable case that there is no reason why F90 mode should support this. "recursive", on the other hand, is an F90 specification. I use the following in my .emacs to get F95 syntax highlighted: (defface f95-keyword-face '((t (:foreground "plum1"))) "F95 keywords face.") (defface f95-function-face '((t (:foreground "azure1"))) "F95 function name face.") (defvar f95-font-lock-keywords (list '("\\<\\(pure\\|elemental\\)\\>" . 'f95-keyword-face) ;; Override existing highlighting of 'elsewhere', etc, but not in comments. '("\\<\\(null\\|cpu_time\\|elsewhere\\)\\>[ \t]*(" (1 (if (f90-in-comment) 'font-lock-comment-face 'f95-function-face) t)) ;; Plain forall should not really be highlighted without trailing '(', ;; but is in existing f90-mode. '("\\(\\ *\\)?\\" . (0 (if (f90-in-comment) 'font-lock-comment-face 'f95-function-face) t)) ;; Highlight the extra 'dim' keyword for these functions. '("\\<\\(\\(max\\|min\\)loc\\|ceiling\\|floor\\)\\>[ \t]*(" ("\\" nil nil (0 'f95-keyword-face))) ) "Highlights extra F95 keywords.") (font-lock-add-keywords 'f90-mode f95-font-lock-keywords)