* 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).
(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)
'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)))