1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-05-03 19:52:16 -07:00

Fix font-lock of Makefile variables at the start of lines

* lisp/progmodes/make-mode.el (makefile-var-use-regex): Match
variables at the beginning of lines correctly (bug#23266).  Change
suggested by Anders Lindgren <andlind@gmail.com>.
This commit is contained in:
Lars Ingebrigtsen 2021-07-08 02:57:46 +02:00
parent 1ffc97a211
commit a45906ac1a

View file

@ -272,7 +272,7 @@ not be enclosed in { } or ( )."
"Regex used to find macro assignment lines in a makefile.")
(defconst makefile-var-use-regex
"[^$]\\$[({]\\([-a-zA-Z0-9_.]+\\|[@%<?^+*][FD]?\\)"
"\\(^\\|[^$]\\)\\$[({]\\([-a-zA-Z0-9_.]+\\|[@%<?^+*][FD]?\\)"
"Regex used to find $(macro) uses in a makefile.")
(defconst makefile-ignored-files-in-pickup-regex
@ -346,7 +346,7 @@ not be enclosed in { } or ( )."
(3 font-lock-builtin-face prepend t))
;; Variable references even in targets/strings/comments.
(,var 1 font-lock-variable-name-face prepend)
(,var 2 font-lock-variable-name-face prepend)
;; Automatic variable references and single character variable references,
;; but not shell variables references.