From: Simon Marshall Date: Mon, 20 Feb 1995 10:49:58 +0000 (+0000) Subject: Turn of syntax fontification by default. X-Git-Tag: emacs-19.34~5071 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1911ebae278c65630938cb999d7b49fdd59a1c74;p=emacs.git Turn of syntax fontification by default. It messes up when inside a comment done by the regexps (or v.v.). --- diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el index c3c32e47fe4..f67d75a2aa6 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el @@ -183,14 +183,16 @@ This variable used in TAB format mode.") ;; 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 @@ with no args, if that value is non-nil." (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)