all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 43265@debbugs.gnu.org, Mauro Aranda <maurooaranda@gmail.com>
Subject: bug#43265: 28.0.50; Inconsistent fontifying in elisp-mode
Date: Sat, 23 Jan 2021 19:42:52 +0100	[thread overview]
Message-ID: <87ft2rv6j7.fsf@gnus.org> (raw)
In-Reply-To: <jwvy2gksjg4.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Fri, 22 Jan 2021 17:32:20 -0500")

[-- Attachment #1: Type: text/plain, Size: 399 bytes --]

Stefan Monnier <monnier@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:


[-- Attachment #2: Type: image/png, Size: 6013 bytes --]

[-- Attachment #3: Type: text/plain, Size: 702 bytes --]


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

  reply	other threads:[~2021-01-23 18:42 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-07 20:05 bug#43265: 28.0.50; Inconsistent fontifying in elisp-mode Mauro Aranda
2021-01-22 19:32 ` Lars Ingebrigtsen
2021-01-22 20:11   ` Mauro Aranda
2021-01-22 22:32   ` Stefan Monnier
2021-01-23 18:42     ` Lars Ingebrigtsen [this message]
2021-01-23 19:54       ` Stefan Monnier
2021-01-24 19:58         ` Lars Ingebrigtsen
2021-01-24 19:59           ` Lars Ingebrigtsen
2021-01-24 20:09           ` Eli Zaretskii
2021-01-24 20:16             ` Lars Ingebrigtsen
2021-01-24 21:58               ` bug#43265: [External] : " Drew Adams
2021-01-25  6:30                 ` Tassilo Horn
2021-01-25  6:39                   ` Lars Ingebrigtsen
2021-01-25  6:46                     ` Tassilo Horn
2021-01-25 13:59                       ` Stefan Monnier
2021-01-25 23:34                         ` Lars Ingebrigtsen
2021-01-25 16:09                       ` Drew Adams
2021-01-25 16:14                         ` Drew Adams
2021-01-25 16:01                   ` Drew Adams
2021-01-24 21:25           ` Stefan Monnier
2021-01-26  0:19 ` Lars Ingebrigtsen
2021-01-26  0:27   ` Mauro Aranda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ft2rv6j7.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=43265@debbugs.gnu.org \
    --cc=maurooaranda@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.