From ba080a3c56f7babfd5956b51455f81fc451ba28f Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Wed, 3 May 2000 19:24:18 +0000 Subject: [PATCH] (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. --- lisp/progmodes/make-mode.el | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index 2c016ec544..7235ec3d6e 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el @@ -285,6 +285,15 @@ not be enclosed in { } or ( )." '("^[ \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) @@ -353,6 +362,12 @@ The function must satisfy this calling convention: ;;; --- end of up-to-date-overview configuration ------------------ +(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-abbrev-table nil "Abbrev table in use in Makefile buffers.") (if makefile-mode-abbrev-table @@ -595,6 +610,9 @@ makefile-special-targets-list: ;; 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) -- 2.39.2