aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorJuanma Barranquero2003-02-11 23:47:11 +0000
committerJuanma Barranquero2003-02-11 23:47:11 +0000
commit61bc75ab6ca503e5be3b2736a5ce8e13f40f1722 (patch)
tree0aab58d8c740410e5ec1ed86aab0a1036c224d6e /lisp/progmodes
parentc47a201af79d6295c6bd21d0c563f1eeecef1a50 (diff)
downloademacs-61bc75ab6ca503e5be3b2736a5ce8e13f40f1722.tar.gz
emacs-61bc75ab6ca503e5be3b2736a5ce8e13f40f1722.zip
(makefile-font-lock-keywords): Fontify single character variable references, but
protect shell variables references. (makefile-mode): Make `$' be punctuation in font-lock-defaults.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/make-mode.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el
index 4d825f83239..98a3d460884 100644
--- a/lisp/progmodes/make-mode.el
+++ b/lisp/progmodes/make-mode.el
@@ -268,13 +268,16 @@ not be enclosed in { } or ( )."
268 ;; Do dependencies. These get the function name face. 268 ;; Do dependencies. These get the function name face.
269 (list makefile-dependency-regex 1 'font-lock-function-name-face) 269 (list makefile-dependency-regex 1 'font-lock-function-name-face)
270 270
271 ;; Variable references even in targets/strings/comments: 271 ;; Variable references even in targets/strings/comments.
272 '("\\$[({]\\([-a-zA-Z0-9_.]+\\)[}):]" 1 font-lock-constant-face prepend) 272 '("\\$[({]\\([-a-zA-Z0-9_.]+\\)[}):]" 1 font-lock-constant-face prepend)
273 273
274 ;; Automatic variable references. 274 ;; Automatic variable references and single character variable references...
275 '("\\$\\([@%<?^+*]\\)" 1 font-lock-reference-face prepend) 275 '("\\$\\([@%<?^+*_]\\|[a-zA-Z0-9]\\>\\)" 1 font-lock-reference-face prepend)
276 '("\\$[({]\\([@%<?^+*][FD]?\\)[}):]" 1 font-lock-reference-face prepend) 276 '("\\$[({]\\([@%<?^+*][FD]?\\)[}):]" 1 font-lock-reference-face prepend)
277 277
278 ;; ...but not shell variables references.
279 '("\\$\\$\\(\\sw+\\)" 1 'default t)
280
278 ;; Fontify conditionals and includes. 281 ;; Fontify conditionals and includes.
279 ;; Note that plain `if' is an automake conditional, and not a bug. 282 ;; Note that plain `if' is an automake conditional, and not a bug.
280 (list 283 (list
@@ -586,7 +589,7 @@ Makefile mode can be configured by modifying the following variables:
586 ;; SYNTAX-BEGIN set to backward-paragraph to avoid slow-down 589 ;; SYNTAX-BEGIN set to backward-paragraph to avoid slow-down
587 ;; near the end of a large buffer, due to parse-partial-sexp's 590 ;; near the end of a large buffer, due to parse-partial-sexp's
588 ;; trying to parse all the way till the beginning of buffer. 591 ;; trying to parse all the way till the beginning of buffer.
589 '(makefile-font-lock-keywords nil nil nil backward-paragraph)) 592 '(makefile-font-lock-keywords nil nil ((?$ . ".")) backward-paragraph))
590 593
591 ;; Add-log. 594 ;; Add-log.
592 (make-local-variable 'add-log-current-defun-function) 595 (make-local-variable 'add-log-current-defun-function)