aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-07-03 21:37:22 +0000
committerRichard M. Stallman1998-07-03 21:37:22 +0000
commit39e7e36ac559499d2a9ee91fe6b3099d1759911b (patch)
treeea0379f0010b8ea5d822147c15171a37dcc5b48f
parent249d440df95b3c0219d128a5fdf266522f91a9cb (diff)
downloademacs-39e7e36ac559499d2a9ee91fe6b3099d1759911b.tar.gz
emacs-39e7e36ac559499d2a9ee91fe6b3099d1759911b.zip
(makefile-font-lock-keywords): Recognize automatic variable references.
(makefile-dependency-regex): Don't be fooled by colons in deps.
-rw-r--r--lisp/progmodes/make-mode.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el
index 54fd5983025..e5d7028e409 100644
--- a/lisp/progmodes/make-mode.el
+++ b/lisp/progmodes/make-mode.el
@@ -234,7 +234,7 @@ not be enclosed in { } or ( )."
234;; that if you change this regexp you must fix the imenu index 234;; that if you change this regexp you must fix the imenu index
235;; function defined at the end of the file. 235;; function defined at the end of the file.
236(defconst makefile-dependency-regex 236(defconst makefile-dependency-regex
237 "^ *\\([^ \n\t#:=]+\\([ \t]+[^ \t\n#:=]+\\)*\\)[ \t]*:\\([ \t]*$\\|\\([^=\n].*$\\)\\)" 237 "^ *\\([^ \n\t#:=]+\\([ \t]+\\([^ \t\n#:=]+\\|\\$[({][^ \t\n#})]+[})]\\)\\)*\\)[ \t]*:\\([ \t]*$\\|\\([^=\n].*$\\)\\)"
238 "Regex used to find dependency lines in a makefile.") 238 "Regex used to find dependency lines in a makefile.")
239 239
240;; Note that the first subexpression is used by font lock. Note that 240;; Note that the first subexpression is used by font lock. Note that
@@ -264,7 +264,10 @@ not be enclosed in { } or ( )."
264 ;; 264 ;;
265 ;; Variable references even in targets/strings/comments: 265 ;; Variable references even in targets/strings/comments:
266 '("\\$[({]\\([-a-zA-Z0-9_.]+\\)[}):]" 1 font-lock-constant-face prepend) 266 '("\\$[({]\\([-a-zA-Z0-9_.]+\\)[}):]" 1 font-lock-constant-face prepend)
267 267 ;;
268 ;; Automatic variable references.
269 '("\\$\\([@%<?^+*]\\)" 1 font-lock-reference-face prepend)
270 ;;
268 ;; Highlight lines that contain just whitespace. 271 ;; Highlight lines that contain just whitespace.
269 ;; They can cause trouble, especially if they start with a tab. 272 ;; They can cause trouble, especially if they start with a tab.
270 '("^[ \t]+$" . makefile-space-face) 273 '("^[ \t]+$" . makefile-space-face)