changeset 62491:2acb3a2dd842

(makefile-previous-dependency, makefile-match-dependency): Check for := (and in bsd mode also !=) to give a better result, even when font-lock is not on.
author Daniel Pfeiffer <occitan@esperanto.org>
date Wed, 18 May 2005 20:10:48 +0000
parents a68d62ff5a87
children 2d94ce2501bb
files lisp/progmodes/make-mode.el
diffstat 1 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/make-mode.el	Wed May 18 18:19:45 2005 +0000
+++ b/lisp/progmodes/make-mode.el	Wed May 18 20:10:48 2005 +0000
@@ -353,15 +353,14 @@
      1 'makefile-targets-face prepend)
 
     ;; Fontify conditionals and includes.
-    ;; Note that plain `if' is an automake conditional, and not a bug.
     (,(concat "^\\(?: [ \t]*\\)?"
 	      (regexp-opt keywords t)
 	      "\\>[ \t]*\\([^: \t\n#]*\\)")
      (1 font-lock-keyword-face) (2 font-lock-variable-name-face))
 
     ,@(if negation
-	 `((,negation (1 font-lock-negation-char-face prepend)
-		      (2 font-lock-negation-char-face prepend t))))
+	  `((,negation (1 font-lock-negation-char-face prepend)
+		       (2 font-lock-negation-char-face prepend t))))
 
     ,@(if space
 	  '(;; Highlight lines that contain just whitespace.
@@ -894,8 +893,9 @@
     (catch 'found
       (while (and (< (skip-chars-backward makefile-dependency-skip) 0)
 		  (not (bobp)))
-	(backward-char)
-	(or (get-text-property (point) 'face)
+	(or (prog1 (eq (char-after) ?=)
+	      (backward-char))
+	    (get-text-property (point) 'face)
 	    (beginning-of-line)
 	    (if (looking-at makefile-dependency-regex)
 		(throw 'found t))))
@@ -1707,7 +1707,8 @@
       (while (and (> (skip-chars-forward makefile-dependency-skip bound) 0)
 		  (not (eobp)))
 	(forward-char)
-	(or (get-text-property (1- (point)) 'face)
+	(or (eq (char-after) ?=)
+	    (get-text-property (1- (point)) 'face)
 	    (when (save-excursion
 		    (beginning-of-line)
 		    (looking-at makefile-dependency-regex))