aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Marshall1995-02-20 10:49:58 +0000
committerSimon Marshall1995-02-20 10:49:58 +0000
commit1911ebae278c65630938cb999d7b49fdd59a1c74 (patch)
treea5d38f08f3decfb0f2b4080c7af2e1c26dd04f9d
parent52110560e99487e7cc75bf1a924b10ea3cac0936 (diff)
downloademacs-1911ebae278c65630938cb999d7b49fdd59a1c74.tar.gz
emacs-1911ebae278c65630938cb999d7b49fdd59a1c74.zip
Turn of syntax fontification by default.
It messes up when inside a comment done by the regexps (or v.v.).
-rw-r--r--lisp/progmodes/fortran.el14
1 files changed, 8 insertions, 6 deletions
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.")
183;; Comments are real pain in Fortran because there is no way to represent the 183;; Comments are real pain in Fortran because there is no way to represent the
184;; standard comment syntax in an Emacs syntax table (we can for VAX-style). 184;; standard comment syntax in an Emacs syntax table (we can for VAX-style).
185;; Therefore an unmatched quote in a standard comment will throw fontification 185;; Therefore an unmatched quote in a standard comment will throw fontification
186;; off on the wrong track. But to make it clear(er) to the programmer what is 186;; off on the wrong track. To make it clear(er) to the programmer what is
187;; happening, we don't override string fontification when fontifying, by the 187;; happening, we could override string fontification when fontifying, by the
188;; keyword regexp, a standard comment. 188;; keyword regexp, a standard comment. But by default we turn off syntax
189;; fontification, and we don't put `!' as a comment-in-any-column in the
190;; regexp keywords as it would be recognised inside a string.
189 191
190(defconst fortran-font-lock-keywords-1 192(defconst fortran-font-lock-keywords-1
191 '(;; Fontify comments. 193 '(;; Fontify comments.
192; ("^[Cc*].*$" 0 font-lock-comment-face t) 194; ("^[Cc!*].*$" 0 font-lock-comment-face t)
193 ("^[Cc*].*$" . font-lock-comment-face) 195 ("^[Cc!*].*$" . font-lock-comment-face)
194 ;; Program, subroutine and function declarations, plus calls. 196 ;; Program, subroutine and function declarations, plus calls.
195 ("\\<\\(call\\|function\\|program\\|subroutine\\)\\>[ \t]*\\(\\sw+\\)?" 197 ("\\<\\(call\\|function\\|program\\|subroutine\\)\\>[ \t]*\\(\\sw+\\)?"
196 (1 font-lock-keyword-face) (2 font-lock-function-name-face nil t))) 198 (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."
420 (setq local-abbrev-table fortran-mode-abbrev-table) 422 (setq local-abbrev-table fortran-mode-abbrev-table)
421 (set-syntax-table fortran-mode-syntax-table) 423 (set-syntax-table fortran-mode-syntax-table)
422 (make-local-variable 'font-lock-defaults) 424 (make-local-variable 'font-lock-defaults)
423 (setq font-lock-defaults '(fortran-font-lock-keywords nil t)) 425 (setq font-lock-defaults '(fortran-font-lock-keywords t t))
424 (make-local-variable 'fortran-break-before-delimiters) 426 (make-local-variable 'fortran-break-before-delimiters)
425 (setq fortran-break-before-delimiters t) 427 (setq fortran-break-before-delimiters t)
426 (make-local-variable 'indent-line-function) 428 (make-local-variable 'indent-line-function)