[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master a45906a: Fix font-lock of Makefile variables at the start of line
From: |
Lars Ingebrigtsen |
Subject: |
master a45906a: Fix font-lock of Makefile variables at the start of lines |
Date: |
Wed, 7 Jul 2021 20:57:54 -0400 (EDT) |
branch: master
commit a45906ac1a973fb8b7141e1e9a5e78ce19692dda
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
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>.
---
lisp/progmodes/make-mode.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el
index 3f466e1..4d27775 100644
--- a/lisp/progmodes/make-mode.el
+++ b/lisp/progmodes/make-mode.el
@@ -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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master a45906a: Fix font-lock of Makefile variables at the start of lines,
Lars Ingebrigtsen <=