aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schwab2003-02-24 23:49:27 +0000
committerAndreas Schwab2003-02-24 23:49:27 +0000
commit33f8eee3edc04006e89c4d3830e26b89b8b833b0 (patch)
tree2bbd9c7791ee87c7362e52d741e3273e08c8be03
parent360564561e4f6b8cab6eb00d25f19eb3279a5058 (diff)
downloademacs-33f8eee3edc04006e89c4d3830e26b89b8b833b0.tar.gz
emacs-33f8eee3edc04006e89c4d3830e26b89b8b833b0.zip
(makefile-font-lock-keywords): Protect
shell variable references by requireing that $ is not preceded by another $.
-rw-r--r--lisp/progmodes/make-mode.el13
1 files changed, 6 insertions, 7 deletions
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el
index dcab340ec82..4ffdfdef011 100644
--- a/lisp/progmodes/make-mode.el
+++ b/lisp/progmodes/make-mode.el
@@ -1,6 +1,6 @@
1;;; make-mode.el --- makefile editing commands for Emacs 1;;; make-mode.el --- makefile editing commands for Emacs
2 2
3;; Copyright (C) 1992,94,99,2000,2001, 2002 Free Software Foundation, Inc. 3;; Copyright (C) 1992,94,99,2000,2001, 2002, 2003 Free Software Foundation, Inc.
4 4
5;; Author: Thomas Neumann <tom@smart.bo.open.de> 5;; Author: Thomas Neumann <tom@smart.bo.open.de>
6;; Eric S. Raymond <esr@snark.thyrsus.com> 6;; Eric S. Raymond <esr@snark.thyrsus.com>
@@ -269,14 +269,13 @@ not be enclosed in { } or ( )."
269 (list makefile-dependency-regex 1 'font-lock-function-name-face) 269 (list makefile-dependency-regex 1 'font-lock-function-name-face)
270 270
271 ;; Variable references even in targets/strings/comments. 271 ;; Variable references even in targets/strings/comments.
272 '("\\$[({]\\([-a-zA-Z0-9_.]+\\|[@%<?^+*][FD]?\\)[}):]" 272 '("[^$]\\$[({]\\([-a-zA-Z0-9_.]+\\|[@%<?^+*][FD]?\\)[}):]"
273 1 font-lock-constant-face prepend) 273 1 font-lock-constant-face prepend)
274 274
275 ;; Automatic variable references and single character variable references... 275 ;; Automatic variable references and single character variable references,
276 '("\\$\\([@%<?^+*_]\\|[a-zA-Z0-9]\\>\\)" 1 font-lock-constant-face prepend) 276 ;; but not shell variables references.
277 277 '("[^$]\\$\\([@%<?^+*_]\\|[a-zA-Z0-9]\\>\\)"
278 ;; ...but not shell variables references. 278 1 font-lock-constant-face prepend)
279 '("\\$\\$\\(\\sw+\\)" 1 'default t)
280 279
281 ;; Fontify conditionals and includes. 280 ;; Fontify conditionals and includes.
282 ;; Note that plain `if' is an automake conditional, and not a bug. 281 ;; Note that plain `if' is an automake conditional, and not a bug.