Mercurial > emacs
changeset 22684:f1cde5061b0b
(makefile-font-lock-keywords): Recognize automatic variable references.
(makefile-dependency-regex): Don't be fooled by colons in deps.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 03 Jul 1998 21:37:22 +0000 |
parents | 0941a5743283 |
children | a9f375bef470 |
files | lisp/progmodes/make-mode.el |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/make-mode.el Fri Jul 03 21:17:47 1998 +0000 +++ b/lisp/progmodes/make-mode.el Fri Jul 03 21:37:22 1998 +0000 @@ -234,7 +234,7 @@ ;; that if you change this regexp you must fix the imenu index ;; function defined at the end of the file. (defconst makefile-dependency-regex - "^ *\\([^ \n\t#:=]+\\([ \t]+[^ \t\n#:=]+\\)*\\)[ \t]*:\\([ \t]*$\\|\\([^=\n].*$\\)\\)" + "^ *\\([^ \n\t#:=]+\\([ \t]+\\([^ \t\n#:=]+\\|\\$[({][^ \t\n#})]+[})]\\)\\)*\\)[ \t]*:\\([ \t]*$\\|\\([^=\n].*$\\)\\)" "Regex used to find dependency lines in a makefile.") ;; Note that the first subexpression is used by font lock. Note that @@ -264,7 +264,10 @@ ;; ;; Variable references even in targets/strings/comments: '("\\$[({]\\([-a-zA-Z0-9_.]+\\)[}):]" 1 font-lock-constant-face prepend) - + ;; + ;; Automatic variable references. + '("\\$\\([@%<?^+*]\\)" 1 font-lock-reference-face prepend) + ;; ;; Highlight lines that contain just whitespace. ;; They can cause trouble, especially if they start with a tab. '("^[ \t]+$" . makefile-space-face)