comparison lisp/progmodes/make-mode.el @ 37469:6c4e7c0d989a

(makefile-font-lock-keywords): Rationalize the rules for includes and conditionals and use the keyword face for them.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 25 Apr 2001 15:52:30 +0000
parents 2b3447fcf42b
children 336177767929
comparison
equal deleted inserted replaced
37468:51c21408401b 37469:6c4e7c0d989a
276 ;; Automatic variable references. 276 ;; Automatic variable references.
277 '("\\$\\([@%<?^+*]\\)" 1 font-lock-reference-face prepend) 277 '("\\$\\([@%<?^+*]\\)" 1 font-lock-reference-face prepend)
278 278
279 ;; Fontify conditionals and includes. 279 ;; Fontify conditionals and includes.
280 ;; Note that plain `if' is an automake conditional, and not a bug. 280 ;; Note that plain `if' is an automake conditional, and not a bug.
281 '("^[ \t]*\\(-?include\\|if\\(n?eq\\|n?def\\)?\\)[ \t]+\\([^: \t\n#]+\\)" 281 (list
282 (1 font-lock-warning-face) (3 font-lock-variable-name-face)) 282 (concat "^\\(?: [ \t]*\\)?"
283 283 (regexp-opt '("-include" "-sinclude" "include" "sinclude" "ifeq"
284 ;; Fontify endif and else. 284 "if" "ifneq" "ifdef" "ifndef" "endif" "else") t)
285 '("^[ \t]*\\(else\\|endif\\)[ \t]*\\(#.*$\\)?" 285 "\\>[ \t]*\\([^: \t\n#]*\\)")
286 (1 font-lock-warning-face)) 286 '(1 font-lock-keyword-face) '(2 font-lock-variable-name-face))
287
288 ;; Fontify conditionals and includes.
289 ;; Note that plain `if' is an automake conditional, and not a bug.
290 '("^[ \t]*\\(-?include\\|if\\(n?eq\\|n?def\\)?\\)[ \t]+\\([^: \t\n#]+\\)"
291 (1 font-lock-reference-face) (3 font-lock-variable-name-face))
292
293 ;; Fontify endif and else.
294 '("^[ \t]*\\(else\\|endif\\)[ \t]*\\(#.*$\\)?"
295 (1 font-lock-reference-face))
296 287
297 ;; Highlight lines that contain just whitespace. 288 ;; Highlight lines that contain just whitespace.
298 ;; They can cause trouble, especially if they start with a tab. 289 ;; They can cause trouble, especially if they start with a tab.
299 '("^[ \t]+$" . makefile-space-face) 290 '("^[ \t]+$" . makefile-space-face)
300 291