aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1996-11-03 20:38:56 +0000
committerRichard M. Stallman1996-11-03 20:38:56 +0000
commit984322b6ac429dcdccf0ba059de6c1f710d57b01 (patch)
tree0bfd9557a9140b475d848f90f5e84aeb8adda9da
parent17feeeb26faa0daa98d93aa13e4e162bd20624e4 (diff)
downloademacs-984322b6ac429dcdccf0ba059de6c1f710d57b01.tar.gz
emacs-984322b6ac429dcdccf0ba059de6c1f710d57b01.zip
(makefile-font-lock-keywords): Handle dependencies
first and variable references after. (makefile-dependency-regex, makefile-macroassign-regex): Accept spaces at the beginning of the line.
-rw-r--r--lisp/progmodes/make-mode.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el
index 47798469439..25aaf3b8cf7 100644
--- a/lisp/progmodes/make-mode.el
+++ b/lisp/progmodes/make-mode.el
@@ -188,14 +188,14 @@ not be enclosed in { } or ( ).")
188;; that if you change this regexp you must fix the imenu index 188;; that if you change this regexp you must fix the imenu index
189;; function defined at the end of the file. 189;; function defined at the end of the file.
190(defconst makefile-dependency-regex 190(defconst makefile-dependency-regex
191 "^\\([^ \n\t#:]+\\([ \t]+[^ \t\n#:]+\\)*\\)[ \t]*:\\([ \t]*$\\|\\([^=\n].*$\\)\\)" 191 "^ *\\([^\n\t#:]+\\([ \t]+[^ \t\n#:]+\\)*\\)[ \t]*:\\([ \t]*$\\|\\([^=\n].*$\\)\\)"
192 "Regex used to find dependency lines in a makefile.") 192 "Regex used to find dependency lines in a makefile.")
193 193
194;; Note that the first subexpression is used by font lock. Note that 194;; Note that the first subexpression is used by font lock. Note that
195;; if you change this regexp you must fix the imenu index function 195;; if you change this regexp you must fix the imenu index function
196;; defined at the end of the file. 196;; defined at the end of the file.
197(defconst makefile-macroassign-regex 197(defconst makefile-macroassign-regex
198 "^\\([^ \n\t][^:#= \t\n]*\\)[ \t]*[*:+]?:?=" 198 "^ *\\([^\n\t][^:#= \t\n]*\\)[ \t]*[*:+]?:?="
199 "Regex used to find macro assignment lines in a makefile.") 199 "Regex used to find macro assignment lines in a makefile.")
200 200
201(defconst makefile-ignored-files-in-pickup-regex 201(defconst makefile-ignored-files-in-pickup-regex
@@ -213,11 +213,11 @@ not be enclosed in { } or ( ).")
213 ;; arbitrarily. 213 ;; arbitrarily.
214 (list makefile-macroassign-regex 1 'font-lock-variable-name-face) 214 (list makefile-macroassign-regex 1 'font-lock-variable-name-face)
215 ;; 215 ;;
216 ;; Do dependencies. These get the function name face.
217 (list makefile-dependency-regex 1 'font-lock-function-name-face)
218 ;;
216 ;; Variable references even in targets/strings/comments: 219 ;; Variable references even in targets/strings/comments:
217 '("\\$[({]\\([-a-zA-Z0-9_.]+\\)[}):]" 1 font-lock-reference-face prepend) 220 '("\\$[({]\\([-a-zA-Z0-9_.]+\\)[}):]" 1 font-lock-reference-face prepend)
218 ;;
219 ;; Do dependencies. These get the function name face.
220 (list makefile-dependency-regex 1 'font-lock-function-name-face 'prepend)
221 221
222 ;; Highlight lines that contain just whitespace. 222 ;; Highlight lines that contain just whitespace.
223 ;; They can cause trouble, especially if they start with a tab. 223 ;; They can cause trouble, especially if they start with a tab.