[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 1e961eda72: Improve makefile-imake-mode
From: |
Po Lu |
Subject: |
master 1e961eda72: Improve makefile-imake-mode |
Date: |
Wed, 12 Oct 2022 08:40:40 -0400 (EDT) |
branch: master
commit 1e961eda7275802f88d855fccf097b4081d21b18
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Improve makefile-imake-mode
* lisp/progmodes/make-mode.el
(makefile-imake-font-lock-keywords): Give Imake priority over
CPP keywords, and don't require comments to start at BOL.
(makefile-imake-mode): Set comment-start to some sensible value.
---
lisp/progmodes/make-mode.el | 21 +++++++++------------
1 file changed, 9 insertions(+), 12 deletions(-)
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el
index cbbcf1c2b7..5f26521299 100644
--- a/lisp/progmodes/make-mode.el
+++ b/lisp/progmodes/make-mode.el
@@ -488,17 +488,12 @@ not be enclosed in { } or ( )."
(defconst makefile-imake-font-lock-keywords
- (append
- (makefile-make-font-lock-keywords
- makefile-var-use-regex
- makefile-statements
- t
- nil
- '("^XCOMM.*$" . font-lock-comment-face)
- '("XVAR\\(?:use\\|def\\)[0-9]" 0 font-lock-keyword-face prepend)
- '("@@" . font-lock-preprocessor-face)
- )
- cpp-font-lock-keywords))
+ (append (list '("XCOMM.*$" . font-lock-comment-face)
+ '("XVAR\\(?:use\\|def\\)[0-9]" 0
+ font-lock-keyword-face prepend)
+ '("@@" . font-lock-preprocessor-face))
+ cpp-font-lock-keywords
+ makefile-font-lock-keywords))
(defconst makefile-syntax-propertize-function
@@ -932,7 +927,9 @@ Makefile mode can be configured by modifying the following
variables:
:syntax-table makefile-imake-mode-syntax-table
(setq-local syntax-propertize-function nil)
(setq font-lock-defaults
- `(makefile-imake-font-lock-keywords ,@(cdr font-lock-defaults))))
+ `(makefile-imake-font-lock-keywords ,@(cdr font-lock-defaults)))
+ (setq-local comment-start "XCOMM")
+ (setq-local comment-start-skip "XCOMM[ \t]*"))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 1e961eda72: Improve makefile-imake-mode,
Po Lu <=