summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-11-03 20:38:56 +0000
committerRichard M. Stallman <rms@gnu.org>1996-11-03 20:38:56 +0000
commit000ccf7cf82e254ef8edd3b54da1c48a1377d8c8 (patch)
treef7636dc538c07d115a6520cc11abfe4e0db2e1c5
parent90014a1670f3e80b65c1b8944d417381a8cbb80c (diff)
downloademacs-000ccf7cf82e254ef8edd3b54da1c48a1377d8c8.tar.gz
(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 ( ).")
;; 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]*:\\([ \t]*$\\|\\([^=\n].*$\\)\\)"
"Regex used to find dependency lines in a makefile.")
;; Note that the first subexpression is used by font lock. Note that
;; if you change this regexp you must fix the imenu index function
;; defined at the end of the file.
(defconst makefile-macroassign-regex
- "^\\([^ \n\t][^:#= \t\n]*\\)[ \t]*[*:+]?:?="
+ "^ *\\([^\n\t][^:#= \t\n]*\\)[ \t]*[*:+]?:?="
"Regex used to find macro assignment lines in a makefile.")
(defconst makefile-ignored-files-in-pickup-regex
@@ -213,11 +213,11 @@ not be enclosed in { } or ( ).")
;; arbitrarily.
(list makefile-macroassign-regex 1 'font-lock-variable-name-face)
;;
+ ;; Do dependencies. These get the function name face.
+ (list makefile-dependency-regex 1 'font-lock-function-name-face)
+ ;;
;; Variable references even in targets/strings/comments:
'("\\$[({]\\([-a-zA-Z0-9_.]+\\)[}):]" 1 font-lock-reference-face prepend)
- ;;
- ;; Do dependencies. These get the function name face.
- (list makefile-dependency-regex 1 'font-lock-function-name-face 'prepend)
;; Highlight lines that contain just whitespace.
;; They can cause trouble, especially if they start with a tab.