# HG changeset patch # User Richard M. Stallman # Date 899501842 0 # Node ID f1cde5061b0b86dc856b6ab99c91fd3d7c1dd5a3 # Parent 0941a5743283070d2464022aa58b2e33881bda0a (makefile-font-lock-keywords): Recognize automatic variable references. (makefile-dependency-regex): Don't be fooled by colons in deps. diff -r 0941a5743283 -r f1cde5061b0b lisp/progmodes/make-mode.el --- 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. + '("\\$\\([@%