changeset 23616:17ebfb12712f

Fix for fontification of strings lost somehow: (fortran-fontify-string): New function. (fortran-font-lock-keywords-1): Use it.
author Dave Love <fx@gnu.org>
date Mon, 02 Nov 1998 19:53:05 +0000
parents f182b7006b7a
children 690f81d9c3a2
files lisp/progmodes/fortran.el
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/fortran.el	Mon Nov 02 18:59:11 1998 +0000
+++ b/lisp/progmodes/fortran.el	Mon Nov 02 19:53:05 1998 +0000
@@ -255,6 +255,13 @@
 (defconst fortran-font-lock-keywords-3 nil
   "Gaudy level highlighting for Fortran mode.")
 
+(defun fortran-fontify-string (limit)
+  (let ((match (match-string 1)))
+    (cond ((string= "'" match)
+	   (re-search-forward "\\([^'\n]*'?\\)" limit))
+	  ((string= "\"" match)
+	   (re-search-forward "\\([^\"\n]*\"?\\)" limit)))))
+
 (let ((comment-chars "c!*")
       (fortran-type-types
 ;       (eval-when-compile
@@ -295,7 +302,9 @@
          (list (concat "^[^" comment-chars "\t\n]" (make-string 71 ?.)
                        "\\(.*\\)")
                '(1 font-lock-comment-face))
-         '("\\(\\s\"\\)\"[^\n]*\\1?" . font-lock-string-face)
+  	 '("\\(\\s\"\\)"		; single- or double-quoted string
+  	   (1 font-lock-string-face)
+  	   (fortran-fontify-string nil nil (1 font-lock-string-face)))
          ;;
          ;; Program, subroutine and function declarations, plus calls.
          (list (concat "\\<\\(block[ \t]*data\\|call\\|entry\\|function\\|"