changeset 53170:67eeb641d52a

(makefile-font-lock-syntactic-keywords): Don't use `space' for \\\n. Be more selective as to which # are comment-starters.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 26 Nov 2003 16:49:33 +0000
parents 4afabd3667c4
children 768493812366
files lisp/progmodes/make-mode.el
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/make-mode.el	Tue Nov 25 23:10:47 2003 +0000
+++ b/lisp/progmodes/make-mode.el	Wed Nov 26 16:49:33 2003 +0000
@@ -301,9 +301,14 @@
    '("^\\( +\\)\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