bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#43265: 28.0.50; Inconsistent fontifying in elisp-mode


From: Stefan Monnier
Subject: bug#43265: 28.0.50; Inconsistent fontifying in elisp-mode
Date: Fri, 22 Jan 2021 17:32:20 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> All special forms get it (`if' is a special form), but macros (like
> `when') only gets it if we're in a funcall position:

Not sure why that is.  Seems like an accident.

> (defun lisp--el-non-funcall-position-p (pos)
>   "Heuristically determine whether POS is an evaluated position."
>
> [...]
>
>                   (and (eq parent 'condition-case)
>                        (progn
>                          (forward-sexp 2)
>                          (< (point) pos))))))))))
>
>
> And this doesn't count any of the error clauses as being in a funcall
> position, so no macros in those get a keyword-face.  

Sounds like a bug.  Note that in

    (condition-case nil
        (foo)
      (error (when a (when b c))))

the second `when` gets the keyword face, as it should.
BTW I suspect that part of the reason for this bug is because of the
need to avoid using the keyword face on the `when` of:

    (condition-case nil
        (foo)
      ((when error) ...))

Adding corresponding tests for these things would be great.


        Stefan






reply via email to

[Prev in Thread] Current Thread [Next in Thread]