GNU bug report logs - #43265
28.0.50; Inconsistent fontifying in elisp-mode

Previous Next

Package: emacs;

Reported by: Mauro Aranda <maurooaranda <at> gmail.com>

Date: Mon, 7 Sep 2020 20:06:02 UTC

Severity: minor

Tags: confirmed

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 43265 <at> debbugs.gnu.org, Mauro Aranda <maurooaranda <at> gmail.com>
Subject: bug#43265: 28.0.50; Inconsistent fontifying in elisp-mode
Date: Sat, 23 Jan 2021 19:42:52 +0100
[Message part 1 (text/plain, inline)]
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>> 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.

The special form bit, or the macro bit?  :-)

Since special forms are always font-locked as keywords when appearing as
the first element in a list, you get stuff like:

[Message part 2 (image/png, inline)]
[Message part 3 (text/plain, inline)]
So if would perhaps make sense to also do the `funcall-position-p' for
special forms?

> 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.

Because then `condition-case' isn't the parent, presumably.

> 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.

Indeed.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

This bug report was last modified 4 years and 172 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.