# HG changeset patch # User Simon Marshall # Date 793277398 0 # Node ID a5e881c047ce36a658036d2141ff7391a7baff4e # Parent 353416feba107a922eeb51213f78e0f8ffefc6fb Turn of syntax fontification by default. It messes up when inside a comment done by the regexps (or v.v.). diff -r 353416feba10 -r a5e881c047ce lisp/progmodes/fortran.el --- a/lisp/progmodes/fortran.el Mon Feb 20 09:39:26 1995 +0000 +++ b/lisp/progmodes/fortran.el Mon Feb 20 10:49:58 1995 +0000 @@ -183,14 +183,16 @@ ;; Comments are real pain in Fortran because there is no way to represent the ;; standard comment syntax in an Emacs syntax table (we can for VAX-style). ;; Therefore an unmatched quote in a standard comment will throw fontification -;; off on the wrong track. But to make it clear(er) to the programmer what is -;; happening, we don't override string fontification when fontifying, by the -;; keyword regexp, a standard comment. +;; off on the wrong track. To make it clear(er) to the programmer what is +;; happening, we could override string fontification when fontifying, by the +;; keyword regexp, a standard comment. But by default we turn off syntax +;; fontification, and we don't put `!' as a comment-in-any-column in the +;; regexp keywords as it would be recognised inside a string. (defconst fortran-font-lock-keywords-1 '(;; Fontify comments. -; ("^[Cc*].*$" 0 font-lock-comment-face t) - ("^[Cc*].*$" . font-lock-comment-face) +; ("^[Cc!*].*$" 0 font-lock-comment-face t) + ("^[Cc!*].*$" . font-lock-comment-face) ;; Program, subroutine and function declarations, plus calls. ("\\<\\(call\\|function\\|program\\|subroutine\\)\\>[ \t]*\\(\\sw+\\)?" (1 font-lock-keyword-face) (2 font-lock-function-name-face nil t))) @@ -420,7 +422,7 @@ (setq local-abbrev-table fortran-mode-abbrev-table) (set-syntax-table fortran-mode-syntax-table) (make-local-variable 'font-lock-defaults) - (setq font-lock-defaults '(fortran-font-lock-keywords nil t)) + (setq font-lock-defaults '(fortran-font-lock-keywords t t)) (make-local-variable 'fortran-break-before-delimiters) (setq fortran-break-before-delimiters t) (make-local-variable 'indent-line-function)