diff options
| author | Glenn Morris | 2010-02-07 12:23:20 -0800 |
|---|---|---|
| committer | Glenn Morris | 2010-02-07 12:23:20 -0800 |
| commit | 50e4518b52438283b2c1fb79f9e9a7efdc315a6b (patch) | |
| tree | bde31cf5b917f9a4a1b9e2c0a0898c5206b149d8 | |
| parent | 5cb9f67486056bfbc93d27dbe5611e8aa238798c (diff) | |
| download | emacs-50e4518b52438283b2c1fb79f9e9a7efdc315a6b.tar.gz emacs-50e4518b52438283b2c1fb79f9e9a7efdc315a6b.zip | |
Fix previous change for F2003 interfaces.
* progmodes/f90.el (f90-font-lock-keywords-1, f90-font-lock-keywords-2):
Move F2003 named interfaces from keywords-2 to keywords-1, and
use function-name-face rather than constant-face.
Simplify "abstract interface" regexp.
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/progmodes/f90.el | 29 |
2 files changed, 17 insertions, 19 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d81e73f34bd..3b21c52e1d6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2010-02-07 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * progmodes/f90.el (f90-font-lock-keywords-1, f90-font-lock-keywords-2): | ||
| 4 | Move F2003 named interfaces from keywords-2 to keywords-1, and | ||
| 5 | use function-name-face rather than constant-face. | ||
| 6 | Simplify "abstract interface" regexp. | ||
| 7 | |||
| 1 | 2010-02-07 Chong Yidong <cyd@stupidchicken.com> | 8 | 2010-02-07 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 9 | ||
| 3 | * eshell/esh-util.el (eshell-file-attributes): New optional arg | 10 | * eshell/esh-util.el (eshell-file-attributes): New optional arg |
diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index da705897622..21273359486 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el | |||
| @@ -158,10 +158,8 @@ | |||
| 158 | ;; 3. Support for align. | 158 | ;; 3. Support for align. |
| 159 | ;; Font-locking: | 159 | ;; Font-locking: |
| 160 | ;; 1. OpenMP, OpenMPI?, preprocessor highlighting. | 160 | ;; 1. OpenMP, OpenMPI?, preprocessor highlighting. |
| 161 | ;; 2. interface blah - Highlight "blah" in function-name face? | 161 | ;; 2. integer_name = 1 |
| 162 | ;; Need to avoid "interface operator (+)" etc. | 162 | ;; 3. Labels for "else" statements (F2003)? |
| 163 | ;; 3. integer_name = 1 | ||
| 164 | ;; 4. Labels for "else" statements (F2003)? | ||
| 165 | 163 | ||
| 166 | (defvar comment-auto-fill-only-comments) | 164 | (defvar comment-auto-fill-only-comments) |
| 167 | (defvar font-lock-keywords) | 165 | (defvar font-lock-keywords) |
| @@ -467,22 +465,21 @@ type-name parts, respectively." | |||
| 467 | ;;; (1 font-lock-keyword-face) (3 font-lock-function-name-face)) | 465 | ;;; (1 font-lock-keyword-face) (3 font-lock-function-name-face)) |
| 468 | '(f90-typedef-matcher | 466 | '(f90-typedef-matcher |
| 469 | (1 font-lock-keyword-face) (2 font-lock-function-name-face)) | 467 | (1 font-lock-keyword-face) (2 font-lock-function-name-face)) |
| 470 | ;; Other functions and declarations. | 468 | ;; F2003. Prevent operators being highlighted as functions. |
| 469 | '("\\<\\(\\(?:end[ \t]*\\)?interface[ \t]*\\(?:assignment\\|operator\\|\ | ||
| 470 | read\\|write\\)\\)[ \t]*(" (1 font-lock-keyword-face t)) | ||
| 471 | ;; Other functions and declarations. Named interfaces = F2003. | ||
| 471 | '("\\<\\(\\(?:end[ \t]*\\)?\\(program\\|module\\|function\\|associate\\|\ | 472 | '("\\<\\(\\(?:end[ \t]*\\)?\\(program\\|module\\|function\\|associate\\|\ |
| 472 | subroutine\\)\\|use\\|call\\)\\>[ \t]*\\(\\sw+\\)?" | 473 | subroutine\\|interface\\)\\|use\\|call\\)\\>[ \t]*\\(\\sw+\\)?" |
| 473 | (1 font-lock-keyword-face) (3 font-lock-function-name-face nil t)) | 474 | (1 font-lock-keyword-face) (3 font-lock-function-name-face nil t)) |
| 474 | ;; F2003. | 475 | ;; F2003. |
| 475 | '("\\<\\(use\\)[ \t]*,[ \t]*\\(\\(?:non_\\)?intrinsic\\)[ \t]*::[ \t]*\ | 476 | '("\\<\\(use\\)[ \t]*,[ \t]*\\(\\(?:non_\\)?intrinsic\\)[ \t]*::[ \t]*\ |
| 476 | \\(\\sw+\\)" | 477 | \\(\\sw+\\)" |
| 477 | (1 font-lock-keyword-face) (2 font-lock-keyword-face) | 478 | (1 font-lock-keyword-face) (2 font-lock-keyword-face) |
| 478 | (3 font-lock-function-name-face)) | 479 | (3 font-lock-function-name-face)) |
| 479 | "\\<\\(\\(end[ \t]*\\)?block[ \t]*data\\|contains\\|\ | 480 | "\\<\\(\\(end[ \t]*\\)?block[ \t]*data\\|contains\\)\\>" |
| 480 | end[ \t]*interface\\)\\>" | 481 | ;; "abstract interface" is F2003. |
| 481 | ;; "abstract interface" is F2003. Must come after previous entry. | 482 | '("\\<abstract[ \t]*interface\\>" (0 font-lock-keyword-face t))) |
| 482 | '("\\<\\(\\(?:abstract[ \t]*\\)?interface\\)\\>" | ||
| 483 | ;; [ \t]*\\(\\(\\sw+\\)[ \t]*[^(]\\)?" | ||
| 484 | ;; (2) messes up "interface operator ()", etc. | ||
| 485 | (1 font-lock-keyword-face))) ;(2 font-lock-function-name-face nil t))) | ||
| 486 | "This does fairly subdued highlighting of comments and function calls.") | 483 | "This does fairly subdued highlighting of comments and function calls.") |
| 487 | 484 | ||
| 488 | ;; NB not explicitly handling this, yet it seems to work. | 485 | ;; NB not explicitly handling this, yet it seems to work. |
| @@ -560,12 +557,6 @@ logical\\|double[ \t]*precision\\|\ | |||
| 560 | (5 font-lock-function-name-face t) (6 'default t)) | 557 | (5 font-lock-function-name-face t) (6 'default t)) |
| 561 | ;; enum (F2003; must be followed by ", bind(C)"). | 558 | ;; enum (F2003; must be followed by ", bind(C)"). |
| 562 | '("\\<\\(enum\\)[ \t]*," (1 font-lock-keyword-face)) | 559 | '("\\<\\(enum\\)[ \t]*," (1 font-lock-keyword-face)) |
| 563 | ;; F2003. Prevent operators being highlighted as constants. | ||
| 564 | '("\\<\\(\\(?:end[ \t]*\\)?interface[ \t]*\\(?:assignment\\|operator\\|\ | ||
| 565 | read\\|write\\)\\)[ \t]*(" (1 font-lock-keyword-face t)) | ||
| 566 | ;; Interface blocks can be named in F2003. | ||
| 567 | '("\\<\\(\\(?:end[ \t]*\\)?interface\\)[ \t]*\\(\\sw+\\)?\\>" | ||
| 568 | (1 font-lock-keyword-face) (2 font-lock-constant-face nil t)) | ||
| 569 | ;; end do, enum (F2003), if, select, where, and forall constructs. | 560 | ;; end do, enum (F2003), if, select, where, and forall constructs. |
| 570 | '("\\<\\(end[ \t]*\\(do\\|if\\|enum\\|select\\|forall\\|where\\)\\)\\>\ | 561 | '("\\<\\(end[ \t]*\\(do\\|if\\|enum\\|select\\|forall\\|where\\)\\)\\>\ |
| 571 | \\([ \t]+\\(\\sw+\\)\\)?" | 562 | \\([ \t]+\\(\\sw+\\)\\)?" |