2005-05-17 Daniel Pfeiffer <occitan@esperanto.org>
* progmodes/make-mode.el (makefile-dependency-skip): New variable.
+ (makefile-macroassign-regex, makefile-make-font-lock-keywords):
+ Also fontify plain strings assigned to variables, mostly so that a
+ colon has a face and is thus not taken as a dependency separator.
(makefile-previous-dependency): Inline the new matcher, because it
is too complex to work in both directions.
(makefile-match-dependency): Eliminate `backward' arg (see above).
Completely reimplemented so as to not sometimes go into an endless
loop. It should also be more efficient, because first it only
searches for `:', instead of applying the very complex regexp.
+ (makefile-mode): Cancel `font-lock-support-mode', because blocks
+ to be fontified in one piece can be too long for JIT. Makefiles
+ are never *that* big.
2005-05-17 Reiner Steib <Reiner.Steib@gmx.de>
;; that if you change this regexp you might have to fix the imenu index in
;; makefile-imenu-generic-expression.
(defconst makefile-macroassign-regex
- "^ *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)\\|[*:+]?[:?]?=\\)"
+ "^ *\\([^ \n\t][^:#= \t\n]*\\)[ \t]*\\(?:!=[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)\\|[*:+]?[:?]?=[ \t]*\\(\\(?:.+\\\\\n\\)*.+\\)\\)"
"Regex used to find macro assignment lines in a makefile.")
(defconst makefile-var-use-regex
(,makefile-macroassign-regex
(1 font-lock-variable-name-face)
;; This is for after !=
- (2 'makefile-shell-face prepend t))
+ (2 'makefile-shell-face prepend t)
+ ;; This is for after normal assignment
+ (3 'font-lock-string-face prepend t))
;; Rule actions.
(makefile-match-action
nil nil
((?$ . "."))
backward-paragraph
- (font-lock-syntactic-keywords . makefile-font-lock-syntactic-keywords)))
+ (font-lock-syntactic-keywords . makefile-font-lock-syntactic-keywords)
+ (font-lock-support-mode))) ; JIT breaks on long series of continuation lines.
;; Add-log.
(make-local-variable 'add-log-current-defun-function)