unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm22@_REMOVETHIS_cam.ac.uk>
Subject: Re: f90.el doesn't recognize elemental attribute for hiliting
Date: Sat, 30 Mar 2002 20:47:54 +0000	[thread overview]
Message-ID: <yebit7deq9x.fsf@xpc21.ast.cam.ac.uk> (raw)
In-Reply-To: 200203302038.g2UKcMF01267@fac13.ds.psu.edu


Richard E Hawkins <hawk@fac13.ds.psu.edu> 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.
   '("\\(\\<end\\> *\\)?\\<forall\\>" .
	 (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]*("
			 ("\\<dim\\>" nil nil (0 'f95-keyword-face)))
   )
  "Highlights extra F95 keywords.")


(font-lock-add-keywords 'f90-mode f95-font-lock-keywords)

      reply	other threads:[~2002-03-30 20:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-30 20:38 f90.el doesn't recognize elemental attribute for hiliting Richard E. Hawkins
2002-03-30 20:47 ` Glenn Morris [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yebit7deq9x.fsf@xpc21.ast.cam.ac.uk \
    --to=rgm22@_removethis_cam.ac.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).