]> code.delx.au - gnu-emacs/commitdiff
Highlight assignments in Makefiles more correctly
authorJohn F. Trudeau <JFTrudeau@aetna.com>
Wed, 24 Feb 2016 01:21:06 +0000 (12:21 +1100)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 24 Feb 2016 01:22:15 +0000 (12:22 +1100)
* lisp/progmodes/make-mode.el (makefile-macroassign-regex):
Highlight assignments preceded by a TAB character correctly
(bug#20787).

Copyright-paperwork-exempt: yes

Backport:

(cherry picked from commit bbd86c5642bd62c43d72391669f28eaa14459fd5)

lisp/progmodes/make-mode.el

index 5cc6321e1ba01390ed8757c879e981e9b08f346e..ee4b10405665da542291d1072d9ecd7475fb42a1 100644 (file)
@@ -291,7 +291,7 @@ not be enclosed in { } or ( )."
   ;; (spanning potentially several lines).
   ;; "^ *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)\\|[*:+]?[:?]?=[ \t]*\\(\\(?:.*\\\\\n\\)*.*\\)\\)"
   ;; What about the define statement?  What about differentiating this for makepp?
-  "\\(?:^\\|^export\\|^override\\|:\\|: *override\\) *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=\\|[*:+]?[:?]?=\\)"
+  "\\(?:^\\|^export\\|^override\\|:\\|:[ \t]*override\\)[ \t]*\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=\\|[*:+]?[:?]?=\\)"
   "Regex used to find macro assignment lines in a makefile.")
 
 (defconst makefile-var-use-regex