Fix macro fontification in `condition-case' handler bodies
* lisp/emacs-lisp/lisp-mode.el (lisp--el-non-funcall-position-p): Fontify macros in the BODY of HANDLERS in `condition-case' correctly (bug#43265).
This commit is contained in:
parent
8f28a1b9da
commit
196be2bf12
2 changed files with 9 additions and 7 deletions
|
@ -233,12 +233,15 @@
|
||||||
(forward-sexp 1)
|
(forward-sexp 1)
|
||||||
(< pos (point))))
|
(< pos (point))))
|
||||||
(and (eq parent 'condition-case)
|
(and (eq parent 'condition-case)
|
||||||
(progn
|
;; If (cdr paren-posns), then we're in the BODY
|
||||||
(forward-sexp 1)
|
;; of HANDLERS.
|
||||||
;; If we're in the second form, then we're in
|
(and (not (cdr paren-posns))
|
||||||
;; a funcall position.
|
(progn
|
||||||
(not (< (point) pos (progn (forward-sexp 1)
|
(forward-sexp 1)
|
||||||
(point)))))))))))))
|
;; If we're in the second form, then we're in
|
||||||
|
;; a funcall position.
|
||||||
|
(not (< (point) pos (progn (forward-sexp 1)
|
||||||
|
(point))))))))))))))
|
||||||
|
|
||||||
(defun lisp--el-match-keyword (limit)
|
(defun lisp--el-match-keyword (limit)
|
||||||
;; FIXME: Move to elisp-mode.el.
|
;; FIXME: Move to elisp-mode.el.
|
||||||
|
|
|
@ -864,7 +864,6 @@ to (xref-elisp-test-descr-to-target xref)."
|
||||||
'nil)))
|
'nil)))
|
||||||
|
|
||||||
(ert-deftest test-elisp-font-keywords-2 ()
|
(ert-deftest test-elisp-font-keywords-2 ()
|
||||||
:expected-result :failed ; FIXME bug#43265
|
|
||||||
(should (eq (test--font '(condition-case nil
|
(should (eq (test--font '(condition-case nil
|
||||||
(foo)
|
(foo)
|
||||||
(error (when a b)))
|
(error (when a b)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue