unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: master 8f28a1b: Tweak `condition-case' keyword highlights
Date: Tue, 26 Jan 2021 01:25:45 +0100	[thread overview]
Message-ID: <87k0s0mtme.fsf@gnus.org> (raw)
In-Reply-To: <jwvczxulyx7.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sun, 24 Jan 2021 18:10:47 -0500")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> (The `when' isn't a keyword here, but it's font-locked as such.)
>
> Yes, that one annoys me fairly often (typically with an arg named `function`).

Yeah, me too.

>> Couldn't we just use `edebug-form-spec' to notice that the arglist isn't
>> a funcall position?
>
> In theory, yes.  That could cover `condition-case` as well ;-)

Indeed.  I'm not sure how high our ambitions here are, though -- getting
this right for all forms may be too slow.  I was thinking we'd get 95%
of the way here by just looking at the "simple" form specs.  Let's
see...  what's the spec for `condition-case'...

(symbolp form &rest
         ([&or symbolp
               (&rest symbolp)]
          body))

Well, OK, perhaps that's not unrealistic to apply in an efficient manner.

> I think it'd be nice to use this spec for other things than just
> debugging [ I remember a discussion a few .. months? .. back where
> another possible use came up... oh yes, it was in the discussion about
> preserving source-code location, where we could make use of this info
> in order to know when the sexp is "code" which can then come with extra
> annotations vs "data" in which case we need the unannotated sexp.  ]

Yup.

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



      reply	other threads:[~2021-01-26  0:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210124203118.16450.28084@vcs0.savannah.gnu.org>
     [not found] ` <20210124203120.0ABC320AD1@vcs0.savannah.gnu.org>
2021-01-24 21:32   ` master 8f28a1b: Tweak `condition-case' keyword highlights Stefan Monnier
2021-01-24 21:45     ` Lars Ingebrigtsen
2021-01-24 22:07       ` [External] : " Drew Adams
2021-01-24 22:50       ` Lars Ingebrigtsen
2021-01-24 23:10       ` Stefan Monnier
2021-01-26  0:25         ` Lars Ingebrigtsen [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87k0s0mtme.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=emacs-devel@gnu.org \
    --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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).