aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/progmodes/fortran.el24
1 files changed, 9 insertions, 15 deletions
diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el
index f65332766dc..19eb1218a3a 100644
--- a/lisp/progmodes/fortran.el
+++ b/lisp/progmodes/fortran.el
@@ -204,8 +204,7 @@ This variable used in TAB format mode.")
204 "program\\|subroutine\\)\\>[ \t]*\\(\\sw+\\)?") 204 "program\\|subroutine\\)\\>[ \t]*\\(\\sw+\\)?")
205 '(1 font-lock-keyword-face) 205 '(1 font-lock-keyword-face)
206 '(2 font-lock-function-name-face nil t)))) 206 '(2 font-lock-function-name-face nil t))))
207 "For consideration as a value of `fortran-font-lock-keywords'. 207 "Subdued level highlighting for Fortran mode.")
208This does fairly subdued highlighting.")
209 208
210(defconst fortran-font-lock-keywords-2 209(defconst fortran-font-lock-keywords-2
211 (append fortran-font-lock-keywords-1 210 (append fortran-font-lock-keywords-1
@@ -264,8 +263,7 @@ This does fairly subdued highlighting.")
264 '(1 font-lock-keyword-face) 263 '(1 font-lock-keyword-face)
265 '(2 font-lock-reference-face nil t)) 264 '(2 font-lock-reference-face nil t))
266 (cons "^ *\\([0-9]+\\)" 'font-lock-reference-face)))) 265 (cons "^ *\\([0-9]+\\)" 'font-lock-reference-face))))
267 "For consideration as a value of `fortran-font-lock-keywords'. 266 "Medium level highlighting for Fortran mode.")
268This does a lot more highlighting.")
269 267
270(defconst fortran-font-lock-keywords-3 268(defconst fortran-font-lock-keywords-3
271 (append fortran-font-lock-keywords-2 269 (append fortran-font-lock-keywords-2
@@ -279,16 +277,10 @@ This does a lot more highlighting.")
279 ;; Highlight a standard continuation character and in a TAB-formatted line. 277 ;; Highlight a standard continuation character and in a TAB-formatted line.
280 '("^ \\([^ 0]\\)" 1 font-lock-string-face) 278 '("^ \\([^ 0]\\)" 1 font-lock-string-face)
281 '("^\t\\([1-9]\\)" 1 font-lock-string-face))) 279 '("^\t\\([1-9]\\)" 1 font-lock-string-face)))
282 "For consideration as a value of `fortran-font-lock-keywords'. 280 "Gaudy level highlighting for Fortran mode.")
283This does even more highlighting.")
284 281
285(defvar fortran-font-lock-keywords (cond ((null font-lock-maximum-decoration) 282(defvar fortran-font-lock-keywords fortran-font-lock-keywords-1
286 fortran-font-lock-keywords-1) 283 "Default expressions to highlight in Fortran mode.")
287 ((eq font-lock-maximum-decoration 2)
288 fortran-font-lock-keywords-2)
289 (t
290 fortran-font-lock-keywords-3))
291 "Additional expressions to highlight in Fortran mode.")
292 284
293(defvar fortran-mode-map () 285(defvar fortran-mode-map ()
294 "Keymap used in Fortran mode.") 286 "Keymap used in Fortran mode.")
@@ -465,8 +457,10 @@ with no args, if that value is non-nil."
465 (setq fortran-startup-message nil) 457 (setq fortran-startup-message nil)
466 (setq local-abbrev-table fortran-mode-abbrev-table) 458 (setq local-abbrev-table fortran-mode-abbrev-table)
467 (set-syntax-table fortran-mode-syntax-table) 459 (set-syntax-table fortran-mode-syntax-table)
468 (make-local-variable 'font-lock-defaults) 460 ;; Font Lock mode support.
469 (setq font-lock-defaults '(fortran-font-lock-keywords t t)) 461 (set (make-local-variable 'font-lock-defaults)
462 '((fortran-font-lock-keywords fortran-font-lock-keywords-1
463 fortran-font-lock-keywords-2 fortran-font-lock-keywords-3) t t))
470 (make-local-variable 'fortran-break-before-delimiters) 464 (make-local-variable 'fortran-break-before-delimiters)
471 (setq fortran-break-before-delimiters t) 465 (setq fortran-break-before-delimiters t)
472 (make-local-variable 'indent-line-function) 466 (make-local-variable 'indent-line-function)