]> git.eshelyaron.com Git - emacs.git/commitdiff
Turn of syntax fontification by default.
authorSimon Marshall <simon@gnu.org>
Mon, 20 Feb 1995 10:49:58 +0000 (10:49 +0000)
committerSimon Marshall <simon@gnu.org>
Mon, 20 Feb 1995 10:49:58 +0000 (10:49 +0000)
It messes up when inside a comment done by the regexps (or v.v.).

lisp/progmodes/fortran.el

index c3c32e47fe40e4f90fd9d59cdd40b74580a82867..f67d75a2aa69c1a91386f7f90e737289cf4111ac 100644 (file)
@@ -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)