emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r108042: Add some f90 preprocessor


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r108042: Add some f90 preprocessor font-lock (bug#10499)
Date: Thu, 21 Jun 2012 15:31:49 -0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 108042
committer: Glenn Morris <address@hidden>
branch nick: emacs-24
timestamp: Thu 2012-06-21 15:31:49 -0400
message:
  Add some f90 preprocessor font-lock (bug#10499)
  
  * lisp/progmodes/f90.el (f90-font-lock-keywords-2):
  Add some preprocessor elements.
modified:
  lisp/ChangeLog
  lisp/progmodes/f90.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-06-21 16:49:21 +0000
+++ b/lisp/ChangeLog    2012-06-21 19:31:49 +0000
@@ -1,3 +1,8 @@
+2012-06-21  Glenn Morris  <address@hidden>
+
+       * progmodes/f90.el (f90-font-lock-keywords-2):
+       Add some preprocessor elements.  (Bug#10499)
+
 2012-06-21  Stefan Monnier  <address@hidden>
 
        * progmodes/cperl-mode.el (cperl-update-syntaxification):

=== modified file 'lisp/progmodes/f90.el'
--- a/lisp/progmodes/f90.el     2012-01-26 06:30:49 +0000
+++ b/lisp/progmodes/f90.el     2012-06-21 19:31:49 +0000
@@ -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 @@
     '("\\<\\(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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]