]> git.eshelyaron.com Git - emacs.git/commitdiff
(makefile-font-lock-syntactic-keywords): Don't use `space' for \\\n.
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 26 Nov 2003 16:49:33 +0000 (16:49 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 26 Nov 2003 16:49:33 +0000 (16:49 +0000)
Be more selective as to which # are comment-starters.

lisp/progmodes/make-mode.el

index ae977b1e52e74db9b35222628ec9d0d8c76b4ed2..f56d08a76b7fc64b0bc57c3b4a8f4a388d6a0152 100644 (file)
@@ -301,9 +301,14 @@ not be enclosed in { } or ( )."
    '("^\\( +\\)\t" 1 makefile-space-face)))
 
 (defconst makefile-font-lock-syntactic-keywords
-  (list
-   ;; Change the syntax of a quoted newline so that it does not end a comment.
-   '("\\\\\n" 0 " ")))
+  ;; From sh-script.el.
+  ;; A `#' begins a comment in sh when it is unquoted and at the beginning
+  ;; of a word.  In the shell, words are separated by metacharacters.
+  ;; The list of special chars is taken from the single-unix spec of the
+  ;; shell command language (under `quoting') but with `$' removed.
+  '(("[^|&;<>()`\\\"' \t\n]\\(#+\\)" 1 "_")
+    ;; Change the syntax of a quoted newline so that it does not end a comment.
+    ("\\\\\n" 0 ".")))
 
 (defvar makefile-imenu-generic-expression
   (list