changeset 23335:af0615edcba3

Don't call regexp-opt when deriving font-lock patterns with keywords that aren't all literal.
author Dave Love <fx@gnu.org>
date Mon, 28 Sep 1998 09:51:12 +0000
parents 8a5e019374e6
children 0c5b5293c8c6
files lisp/progmodes/fortran.el
diffstat 1 files changed, 17 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/fortran.el	Mon Sep 28 09:20:40 1998 +0000
+++ b/lisp/progmodes/fortran.el	Mon Sep 28 09:51:12 1998 +0000
@@ -257,20 +257,23 @@
 
 (let ((comment-chars "c!*")
       (fortran-type-types
-       (eval-when-compile
-         (regexp-opt
-          (let ((simple-types '("character" "byte" "integer" "logical"
-                                "none" "real" "complex"
-                                "double[ \t]*precision" "double[ \t]*complex"))
-                (structured-types '("structure" "union" "map"))
-                (other-types '("record" "dimension" "parameter" "common" "save"
-                               "external" "intrinsic" "data" "equivalence")))
-            (append
-             (mapcar (lambda (x) (concat "implicit[ \t]*" x)) simple-types)
-             simple-types
-             (mapcar (lambda (x) (concat "end[ \t]*" x)) structured-types)
-             structured-types
-             other-types)))))
+;       (eval-when-compile
+;         (regexp-opt
+;          (let ((simple-types '("character" "byte" "integer" "logical"
+;                                "none" "real" "complex"
+;                                "double[ \t]*precision" "double[ \t]*complex"))
+;                (structured-types '("structure" "union" "map"))
+;                (other-types '("record" "dimension" "parameter" "common" "save"
+;                               "external" "intrinsic" "data" "equivalence")))
+;            (append
+;             (mapcar (lambda (x) (concat "implicit[ \t]*" x)) simple-types)
+;             simple-types
+;             (mapcar (lambda (x) (concat "end[ \t]*" x)) structured-types)
+;             structured-types
+;             other-types))))
+       ;; Derived from the above, changing the escaped `[ \t]*'s back.
+       ;; Should be done with a `replace all in string' function...
+       "byte\\|c\\(haracter\\|om\\(mon\\|plex\\)\\)\\|d\\(ata\\|imension\\|ouble[ \t]*\\(complex\\|precision\\)\\)\\|e\\(nd[ \t]*\\(map\\|structure\\|union\\)\\|quivalence\\|xternal\\)\\|i\\(mplicit[ \t]*\\(byte\\|c\\(haracter\\|omplex\\)\\|double[ \t]*\\(complex\\|precision\\)\\|integer\\|logical\\|none\\|real\\)\\|nt\\(eger\\|rinsic\\)\\)\\|logical\\|map\\|none\\|parameter\\|re\\(al\\|cord\\)\\|s\\(ave\\|tructure\\)\\|union")
       (fortran-keywords
        (eval-when-compile
          (regexp-opt '("continue" "format" "end" "enddo" "if" "then"