diff options
| author | Dave Love | 1998-09-28 09:51:12 +0000 |
|---|---|---|
| committer | Dave Love | 1998-09-28 09:51:12 +0000 |
| commit | e58aeb3dd3792983b58c1ae24d89af4ccf458f4c (patch) | |
| tree | 4185b94d9d667e0abe7ee1202f13008411dc9c89 | |
| parent | f9e6a7e8f597e78717b58c13dbac6da535a02973 (diff) | |
| download | emacs-e58aeb3dd3792983b58c1ae24d89af4ccf458f4c.tar.gz emacs-e58aeb3dd3792983b58c1ae24d89af4ccf458f4c.zip | |
Don't call regexp-opt when deriving
font-lock patterns with keywords that aren't all literal.
| -rw-r--r-- | lisp/progmodes/fortran.el | 31 |
1 files 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.") | |||
| 257 | 257 | ||
| 258 | (let ((comment-chars "c!*") | 258 | (let ((comment-chars "c!*") |
| 259 | (fortran-type-types | 259 | (fortran-type-types |
| 260 | (eval-when-compile | 260 | ; (eval-when-compile |
| 261 | (regexp-opt | 261 | ; (regexp-opt |
| 262 | (let ((simple-types '("character" "byte" "integer" "logical" | 262 | ; (let ((simple-types '("character" "byte" "integer" "logical" |
| 263 | "none" "real" "complex" | 263 | ; "none" "real" "complex" |
| 264 | "double[ \t]*precision" "double[ \t]*complex")) | 264 | ; "double[ \t]*precision" "double[ \t]*complex")) |
| 265 | (structured-types '("structure" "union" "map")) | 265 | ; (structured-types '("structure" "union" "map")) |
| 266 | (other-types '("record" "dimension" "parameter" "common" "save" | 266 | ; (other-types '("record" "dimension" "parameter" "common" "save" |
| 267 | "external" "intrinsic" "data" "equivalence"))) | 267 | ; "external" "intrinsic" "data" "equivalence"))) |
| 268 | (append | 268 | ; (append |
| 269 | (mapcar (lambda (x) (concat "implicit[ \t]*" x)) simple-types) | 269 | ; (mapcar (lambda (x) (concat "implicit[ \t]*" x)) simple-types) |
| 270 | simple-types | 270 | ; simple-types |
| 271 | (mapcar (lambda (x) (concat "end[ \t]*" x)) structured-types) | 271 | ; (mapcar (lambda (x) (concat "end[ \t]*" x)) structured-types) |
| 272 | structured-types | 272 | ; structured-types |
| 273 | other-types))))) | 273 | ; other-types)))) |
| 274 | ;; Derived from the above, changing the escaped `[ \t]*'s back. | ||
| 275 | ;; Should be done with a `replace all in string' function... | ||
| 276 | "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") | ||
| 274 | (fortran-keywords | 277 | (fortran-keywords |
| 275 | (eval-when-compile | 278 | (eval-when-compile |
| 276 | (regexp-opt '("continue" "format" "end" "enddo" "if" "then" | 279 | (regexp-opt '("continue" "format" "end" "enddo" "if" "then" |