[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master a10c74f: Fontify special forms and macros the same
From: |
Lars Ingebrigtsen |
Subject: |
master a10c74f: Fontify special forms and macros the same |
Date: |
Mon, 25 Jan 2021 01:44:38 -0500 (EST) |
branch: master
commit a10c74fbea46d5299e19167248383c69fd30648c
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
Fontify special forms and macros the same
* lisp/emacs-lisp/lisp-mode.el (lisp--el-match-keyword): Handle
special forms and macros the same way (bug#43265). This makes
things like (setq a '(if a b)) be fontified correctly (i.e., not
fontified as a keyword).
---
lisp/emacs-lisp/lisp-mode.el | 7 +++----
test/lisp/progmodes/elisp-mode-tests.el | 1 -
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 22435d5..c96d849 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -257,10 +257,9 @@
(concat "(\\(" lisp-mode-symbol-regexp "\\)\\_>"))
limit t)
(let ((sym (intern-soft (match-string 1))))
- (when (or (special-form-p sym)
- (and (macrop sym)
- (not (get sym 'no-font-lock-keyword))
- (lisp--el-funcall-position-p (match-beginning 0))))
+ (when (and (or (special-form-p sym) (macrop sym))
+ (not (get sym 'no-font-lock-keyword))
+ (lisp--el-funcall-position-p (match-beginning 0)))
(throw 'found t))))))
(defmacro let-when-compile (bindings &rest body)
diff --git a/test/lisp/progmodes/elisp-mode-tests.el
b/test/lisp/progmodes/elisp-mode-tests.el
index e84184f..badcad6 100644
--- a/test/lisp/progmodes/elisp-mode-tests.el
+++ b/test/lisp/progmodes/elisp-mode-tests.el
@@ -871,7 +871,6 @@ to (xref-elisp-test-descr-to-target xref)."
'font-lock-keyword-face)))
(ert-deftest test-elisp-font-keywords-3 ()
- :expected-result :failed ; FIXME bug#43265
(should (eq (test--font '(setq a '(if when zot))
"(\\(if\\)")
nil)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master a10c74f: Fontify special forms and macros the same,
Lars Ingebrigtsen <=