From: Glenn Morris Date: Sat, 3 Aug 2002 18:58:32 +0000 (+0000) Subject: (f90-font-lock-keywords-1): Fix form for declaration of derived type. X-Git-Tag: emacs-pretest-21.2.91~130 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=461de971cdec297fcaecdde29d137324b945af3e;p=emacs.git (f90-font-lock-keywords-1): Fix form for declaration of derived type. (f90-font-lock-keywords-2): Fix form for `implicit type(foo)'. (f90-type-def-re): Fix value. (f90-looking-at-type-like): Adjust for new value of f90-type-def-re. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e59ca674d4e..267a8d1d237 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2002-08-03 Glenn Morris + + * progmodes/f90.el (f90-font-lock-keywords-1): Fix form for + declaration of derived type. + (f90-font-lock-keywords-2): Fix form for `implicit type(foo)'. + (f90-type-def-re): Fix value. + (f90-looking-at-type-like): Adjust for new value of f90-type-def-re. + 2002-08-02 Richard M. Stallman * autoinsert.el (auto-insert-alist): Redo finding C and C++ headers. diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index 1013fe56fa7..aeeab4d85ec 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el @@ -360,13 +360,13 @@ whether to blink the matching beginning." (list ;; Special highlighting of "module procedure foo-list" '("\\<\\(module[ \t]*procedure\\)\\>" (1 font-lock-keyword-face)) - '("\\<\\(end[ \t]*\\(program\\|module\\|function\\|subroutine\\|type\\)\\)\\>[ \t]*\\(\\sw+\\)?" + '("\\<\\(end[ \t]*\\(program\\|module\\|function\\|subroutine\\)\\)\\>[ \t]*\\(\\sw+\\)?" (1 font-lock-keyword-face) (3 font-lock-function-name-face nil t)) - '("\\<\\(program\\|type\\|call\\|module\\|subroutine\\|function\\|use\\)\\>[ \t]*\\(\\sw+\\)?" + '("\\<\\(program\\|call\\|module\\|subroutine\\|function\\|use\\)\\>[ \t]*\\(\\sw+\\)?" (1 font-lock-keyword-face) (2 font-lock-function-name-face nil t)) - ;; Highlight definition of new type -;;; '("\\<\\(type\\)[ \t]*\\(.*::[ \t]*\\|[ \t]+\\)\\(\\sw+\\)" -;;; (1 font-lock-keyword-face) (3 font-lock-function-name-face)) + ;; Highlight definition of derived type. + '("\\<\\(\\(?:end[ \t]*\\)?type\\)\\>\\([^()\n]*::\\)?[ \t]*\\(\\sw+\\)" + (1 font-lock-keyword-face) (3 font-lock-function-name-face)) "\\<\\(\\(end[ \t]*\\)?\\(interface\\|block[ \t]*data\\)\\|contains\\)\\>") "This does fairly subdued highlighting of comments and function calls.") @@ -382,7 +382,7 @@ whether to blink the matching beginning." '("^[ \t0-9]*\\(\\(\\sw+\\)[ \t]*:[ \t]*\\)?\\(\\(if\\|do\\([ \t]*while\\)?\\|select[ \t]*case\\|where\\|forall\\)\\)\\>" (2 font-lock-constant-face nil t) (3 font-lock-keyword-face)) ;; implicit declaration - '("\\<\\(implicit\\)[ \t]*\\(real\\|integer\\|c\\(haracter\\|omplex\\)\\|logical\\|type[ \t]*(\\sw+)\\|none\\)\\>" (1 font-lock-keyword-face) (2 font-lock-type-face)) + '("\\<\\(implicit\\)[ \t]*\\(real\\|integer\\|c\\(haracter\\|omplex\\)\\|logical\\|type[ \t]*(\\sw+)\\|none\\)[ \t]*" (1 font-lock-keyword-face) (2 font-lock-type-face)) '("\\<\\(namelist\\|common\\)[ \t]*\/\\(\\sw+\\)?\/" (1 font-lock-keyword-face) (2 font-lock-constant-face nil t)) "\\" "\\<\\(then\\|continue\\|format\\|include\\|stop\\|return\\)\\>" @@ -646,7 +646,7 @@ program\\|select\\|subroutine\\|type\\|where\\|forall\\)\\>") (defconst f90-end-type-re "end[ \t]*\\(type\\|interface\\|block[ \t]*data\\)") (defconst f90-type-def-re - "\\<\\(type\\)\\([^(\n]*\\)\\(::\\)?[ \t]*\\b\\(\\sw+\\)") + "\\<\\(type\\)\\>\\([^(\n]*::\\)?[ \t]*\\(\\sw+\\)") (defconst f90-no-break-re "\\(\\*\\*\\|//\\|=>\\)") ;; A temporary position to make region operators faster (defvar f90-cache-position nil) @@ -1011,7 +1011,7 @@ Name is nil if the statement has no label." Name is non-nil only for type." (cond ((looking-at f90-type-def-re) - (list (f90-match-piece 1) (f90-match-piece 4))) + (list (f90-match-piece 1) (f90-match-piece 3))) ((looking-at "\\(interface\\|block[\t]*data\\)\\>") (list (f90-match-piece 1) nil))))