# HG changeset patch # User Stefan Monnier # Date 988213950 0 # Node ID 6c4e7c0d989abc6f8258fbd7afc93bd0bc8e8f6f # Parent 51c21408401b6bea0b0ca95c135b51f092ceb408 (makefile-font-lock-keywords): Rationalize the rules for includes and conditionals and use the keyword face for them. diff -r 51c21408401b -r 6c4e7c0d989a lisp/progmodes/make-mode.el --- a/lisp/progmodes/make-mode.el Wed Apr 25 15:22:53 2001 +0000 +++ b/lisp/progmodes/make-mode.el Wed Apr 25 15:52:30 2001 +0000 @@ -278,21 +278,12 @@ ;; Fontify conditionals and includes. ;; Note that plain `if' is an automake conditional, and not a bug. - '("^[ \t]*\\(-?include\\|if\\(n?eq\\|n?def\\)?\\)[ \t]+\\([^: \t\n#]+\\)" - (1 font-lock-warning-face) (3 font-lock-variable-name-face)) - - ;; Fontify endif and else. - '("^[ \t]*\\(else\\|endif\\)[ \t]*\\(#.*$\\)?" - (1 font-lock-warning-face)) - - ;; Fontify conditionals and includes. - ;; Note that plain `if' is an automake conditional, and not a bug. - '("^[ \t]*\\(-?include\\|if\\(n?eq\\|n?def\\)?\\)[ \t]+\\([^: \t\n#]+\\)" - (1 font-lock-reference-face) (3 font-lock-variable-name-face)) - - ;; Fontify endif and else. - '("^[ \t]*\\(else\\|endif\\)[ \t]*\\(#.*$\\)?" - (1 font-lock-reference-face)) + (list + (concat "^\\(?: [ \t]*\\)?" + (regexp-opt '("-include" "-sinclude" "include" "sinclude" "ifeq" + "if" "ifneq" "ifdef" "ifndef" "endif" "else") t) + "\\>[ \t]*\\([^: \t\n#]*\\)") + '(1 font-lock-keyword-face) '(2 font-lock-variable-name-face)) ;; Highlight lines that contain just whitespace. ;; They can cause trouble, especially if they start with a tab.