changeset 28802:f7eed599c0df

(makefile-mode-abbrev-table): New variable. (makefile-mode): Set local abbrev table to makefile-mode-abbrev-table. (makefile-font-lock-keywords): Fontify includes and conditionals.
author Gerd Moellmann <gerd@gnu.org>
date Wed, 03 May 2000 19:24:18 +0000
parents be3f5fa41e90
children 80075cf72ede
files lisp/progmodes/make-mode.el
diffstat 1 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/make-mode.el	Wed May 03 19:23:28 2000 +0000
+++ b/lisp/progmodes/make-mode.el	Wed May 03 19:24:18 2000 +0000
@@ -285,6 +285,15 @@
    '("^[ \t]*\\(else\\|endif\\)[ \t]*\\(#.*$\\)?"
      (1 font-lock-warning-face))
 
+   ;; Fontify conditionals and includes.
+   ;; Note that plain `if' is an automake conditional, and not a bug.
+   '("^[ \t]*\\(-?include\\|if\\(n?eq\\|n?def\\)?\\)[ \t]+\\([^: \t\n#]+\\)"
+     (1 font-lock-reference-face) (3 font-lock-variable-name-face))
+
+   ;; Fontify endif and else.
+   '("^[ \t]*\\(else\\|endif\\)[ \t]*\\(#.*$\\)?"
+     (1 font-lock-reference-face))
+
    ;; Highlight lines that contain just whitespace.
    ;; They can cause trouble, especially if they start with a tab.
    '("^[ \t]+$" . makefile-space-face)
@@ -359,6 +368,12 @@
     ()
   (define-abbrev-table 'makefile-mode-abbrev-table ()))
 
+(defvar makefile-mode-abbrev-table nil
+  "Abbrev table in use in Makefile buffers.")
+(if makefile-mode-abbrev-table
+    ()
+  (define-abbrev-table 'makefile-mode-abbrev-table ()))
+
 (defvar makefile-mode-map nil
   "The keymap that is used in Makefile mode.")
 
@@ -595,6 +610,9 @@
   ;; Other abbrevs.
   (setq local-abbrev-table makefile-mode-abbrev-table)
 
+  ;; Other abbrevs.
+  (setq local-abbrev-table makefile-mode-abbrev-table)
+
   ;; Filling.
   (make-local-variable 'fill-paragraph-function)
   (setq fill-paragraph-function 'makefile-fill-paragraph)