* Re: master 2de25accaf 4/4: Warn about `condition-case' with quoted condition names
[not found] ` <20221229114403.7EA13C05F48@vcs2.savannah.gnu.org>
@ 2022-12-29 14:45 ` Stefan Monnier
2022-12-29 15:28 ` Mattias Engdegård
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2022-12-29 14:45 UTC (permalink / raw)
To: emacs-devel; +Cc: Mattias Engdegård
> + (when (and (eq (car-safe condition) 'quote)
> + (cdr condition) (null (cddr condition)))
> + (byte-compile-warn-x
> + condition "`condition-case' condition should not be quoted: %S"
> + condition))
Shouldn't we instead warn about any unknown error signals?
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: master 2de25accaf 4/4: Warn about `condition-case' with quoted condition names
2022-12-29 14:45 ` master 2de25accaf 4/4: Warn about `condition-case' with quoted condition names Stefan Monnier
@ 2022-12-29 15:28 ` Mattias Engdegård
2022-12-29 15:33 ` Stefan Monnier
0 siblings, 1 reply; 5+ messages in thread
From: Mattias Engdegård @ 2022-12-29 15:28 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
29 dec. 2022 kl. 15.45 skrev Stefan Monnier <monnier@iro.umontreal.ca>:
> Shouldn't we instead warn about any unknown error signals?
Ideally both -- special-casing quoted arguments gives better diagnostics.
But do we know all errors statically at compile-time?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: master 2de25accaf 4/4: Warn about `condition-case' with quoted condition names
2022-12-29 15:28 ` Mattias Engdegård
@ 2022-12-29 15:33 ` Stefan Monnier
2022-12-29 15:50 ` Mattias Engdegård
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2022-12-29 15:33 UTC (permalink / raw)
To: Mattias Engdegård; +Cc: emacs-devel
>> Shouldn't we instead warn about any unknown error signals?
> Ideally both -- special-casing quoted arguments gives better diagnostics.
> But do we know all errors statically at compile-time?
Error identifiers should have an `error-conditions` property.
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: master 2de25accaf 4/4: Warn about `condition-case' with quoted condition names
2022-12-29 15:33 ` Stefan Monnier
@ 2022-12-29 15:50 ` Mattias Engdegård
2022-12-29 16:14 ` Stefan Monnier
0 siblings, 1 reply; 5+ messages in thread
From: Mattias Engdegård @ 2022-12-29 15:50 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
29 dec. 2022 kl. 16.33 skrev Stefan Monnier <monnier@iro.umontreal.ca>:
>> But do we know all errors statically at compile-time?
>
> Error identifiers should have an `error-conditions` property.
You left the `error-conditions` property check commented out in `byte-compile-condition-case` so maybe it wasn't quite that straightforward?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: master 2de25accaf 4/4: Warn about `condition-case' with quoted condition names
2022-12-29 15:50 ` Mattias Engdegård
@ 2022-12-29 16:14 ` Stefan Monnier
0 siblings, 0 replies; 5+ messages in thread
From: Stefan Monnier @ 2022-12-29 16:14 UTC (permalink / raw)
To: Mattias Engdegård; +Cc: emacs-devel
Mattias Engdegård [2022-12-29 16:50:37] wrote:
> 29 dec. 2022 kl. 16.33 skrev Stefan Monnier <monnier@iro.umontreal.ca>:
>>> But do we know all errors statically at compile-time?
>>
>> Error identifiers should have an `error-conditions` property.
>
> You left the `error-conditions` property check commented out in
> `byte-compile-condition-case` so maybe it wasn't quite that straightforward?
I can't remember what came up, but my guess is that it's a question
of making the byte-compiler recognize `define-error` and things like
that (i.e. try and reduce the number of false positives where the error
is unknown at compile time but will be known at run-time).
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-12-29 16:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <167231424264.29966.177874348975736593@vcs2.savannah.gnu.org>
[not found] ` <20221229114403.7EA13C05F48@vcs2.savannah.gnu.org>
2022-12-29 14:45 ` master 2de25accaf 4/4: Warn about `condition-case' with quoted condition names Stefan Monnier
2022-12-29 15:28 ` Mattias Engdegård
2022-12-29 15:33 ` Stefan Monnier
2022-12-29 15:50 ` Mattias Engdegård
2022-12-29 16:14 ` Stefan Monnier
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.