From e58aeb3dd3792983b58c1ae24d89af4ccf458f4c Mon Sep 17 00:00:00 2001 From: Dave Love Date: Mon, 28 Sep 1998 09:51:12 +0000 Subject: [PATCH] Don't call regexp-opt when deriving font-lock patterns with keywords that aren't all literal. --- lisp/progmodes/fortran.el | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/lisp/progmodes/fortran.el b/lisp/progmodes/fortran.el index dc622e675a1..c113020b1c6 100644 --- a/lisp/progmodes/fortran.el +++ b/lisp/progmodes/fortran.el @@ -257,20 +257,23 @@ format style.") (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" -- 2.39.2