diff options
author | Glenn Morris <rgm@gnu.org> | 2012-06-21 15:31:49 -0400 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2012-06-21 15:31:49 -0400 |
commit | 9e29ca4f4841910da08f73064532c891290cb252 (patch) | |
tree | ac8961b3a985dc9264720e2cdb51fe6f3152cf22 /lisp/progmodes/f90.el | |
parent | bde2ab6f5bd2be6769f36e17fc99352382ffcc0a (diff) | |
download | emacs-9e29ca4f4841910da08f73064532c891290cb252.tar.gz emacs-9e29ca4f4841910da08f73064532c891290cb252.tar.bz2 emacs-9e29ca4f4841910da08f73064532c891290cb252.zip |
Add some f90 preprocessor font-lock (bug#10499)
* lisp/progmodes/f90.el (f90-font-lock-keywords-2):
Add some preprocessor elements.
Diffstat (limited to 'lisp/progmodes/f90.el')
-rw-r--r-- | lisp/progmodes/f90.el | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index df6fdfd7cd9..0c8071cdc4d 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el @@ -233,6 +233,7 @@ :safe 'stringp :group 'f90-indent) +;; Should we add ^# to this? That's not really a comment. (defcustom f90-directive-comment-re "!hpf\\$" "Regexp of comment-like directive like \"!HPF\\\\$\", not to be indented." :type 'regexp @@ -627,7 +628,14 @@ logical\\|double[ \t]*precision\\|type[ \t]*(\\sw+)\\|none\\)[ \t]*" '("\\<\\(do\\|go[ \t]*to\\)\\>[ \t]*\\([0-9]+\\)" (1 font-lock-keyword-face) (2 font-lock-constant-face)) ;; Line numbers (lines whose first character after number is letter). - '("^[ \t]*\\([0-9]+\\)[ \t]*[a-z]+" (1 font-lock-constant-face t)))) + '("^[ \t]*\\([0-9]+\\)[ \t]*[a-z]+" (1 font-lock-constant-face t)) + ;; Override eg for "#include". + '("^#[ \t]*\\w+" (0 font-lock-preprocessor-face t) + ("\\<defined\\>" nil nil (0 font-lock-preprocessor-face))) + '("^#" ("\\(&&\\|||\\)" nil nil (0 font-lock-constant-face t))) + '("^#[ \t]*define[ \t]+\\(\\w+\\)(" (1 font-lock-function-name-face)) + '("^#[ \t]*define[ \t]+\\(\\w+\\)" (1 font-lock-variable-name-face)) + '("^#[ \t]*include[ \t]+\\(<.+>\\)" (1 font-lock-string-face)))) "Highlights declarations, do-loops and other constructs.") (defvar f90-font-lock-keywords-3 |