* bug#74870: cl-labels and cl-flet don't create named blocks
@ 2024-12-13 23:30 Jan Jouleodov via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-14 16:54 ` Eli Zaretskii
0 siblings, 1 reply; 5+ messages in thread
From: Jan Jouleodov via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-12-13 23:30 UTC (permalink / raw)
To: 74870
[-- Attachment #1: Type: text/plain, Size: 171 bytes --]
In ANSI CL, these should create a named CL:BLOCK, allowing one to do a local return via CL:RETURN-FROM. In Emacs, this is not the case, resulting in an uncaught exception.
[-- Attachment #2: Type: text/html, Size: 302 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#74870: cl-labels and cl-flet don't create named blocks
2024-12-13 23:30 bug#74870: cl-labels and cl-flet don't create named blocks Jan Jouleodov via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-12-14 16:54 ` Eli Zaretskii
2024-12-17 3:23 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-19 16:28 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 2 replies; 5+ messages in thread
From: Eli Zaretskii @ 2024-12-14 16:54 UTC (permalink / raw)
To: Jan Jouleodov, Stefan Monnier; +Cc: 74870
> Date: Fri, 13 Dec 2024 23:30:41 +0000
> From: Jan Jouleodov via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
> In ANSI CL, these should create a named CL:BLOCK, allowing one to do a local return via
> CL:RETURN-FROM. In Emacs, this is not the case, resulting in an uncaught exception.
I'm guessing this is a documentation bug, in that this particular
aspect of CL is not emulated by cl-labels.
Stefan, am I right?
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#74870: cl-labels and cl-flet don't create named blocks
2024-12-14 16:54 ` Eli Zaretskii
@ 2024-12-17 3:23 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-19 0:55 ` Jan Jouleodov via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-19 16:28 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 1 reply; 5+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-12-17 3:23 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 74870, Jan Jouleodov
>> In ANSI CL, these should create a named CL:BLOCK, allowing one to do a local return via
>> CL:RETURN-FROM. In Emacs, this is not the case, resulting in an uncaught exception.
> I'm guessing this is a documentation bug, in that this particular
> aspect of CL is not emulated by cl-labels.
> Stefan, am I right?
Could be. Or it could be an oversight, maybe dating back to many many
years ago, and that nobody noticed until now.
Whichever was the original reason, now we get to decide whether we keep
the behavior or not. Following Common Lisp's lead should not introduce any
backward compatibility issue, all it would cost us is a slightly more
costly macroexpansion for those macros.
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#74870: cl-labels and cl-flet don't create named blocks
2024-12-17 3:23 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-12-19 0:55 ` Jan Jouleodov via Bug reports for GNU Emacs, the Swiss army knife of text editors
0 siblings, 0 replies; 5+ messages in thread
From: Jan Jouleodov via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-12-19 0:55 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Eli Zaretskii, 74870
> Whichever was the original reason, now we get to decide whether we keep
> the behavior or not. Following Common Lisp's lead should not introduce any
> backward compatibility issue, all it would cost us is a slightly more
> costly macroexpansion for those macros.
>
>
> Stefan
Is there any reason why one would not want to *always* emulate the CL
behavior in cl-lib? I could only think of a backward compatibility
problem before CL was standardized, but I am not familiar with the time
frame of cl-lib to know if that's really the case.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#74870: cl-labels and cl-flet don't create named blocks
2024-12-14 16:54 ` Eli Zaretskii
2024-12-17 3:23 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2024-12-19 16:28 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
1 sibling, 0 replies; 5+ messages in thread
From: Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2024-12-19 16:28 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 74870, Stefan Monnier, Jan Jouleodov
Eli Zaretskii <eliz@gnu.org> writes:
> I'm guessing this is a documentation bug, in that this particular
> aspect of CL is not emulated by cl-labels.
I dug a bit into the history.
`flet's implementation indeed lost its implicit `cl-block' in
de7e2b36875 Get rid of cl-lexical-let, keeping only lexical-let for
compatibility.
Stefan Monnier <monnier@iro.umontreal.ca>, Thu Jun 7 2012
probably by accident.
OTOH it looks like `cl-labels' never created implicit blocks. As the
manual describes it as especially useful for recursive local function
bindings, this case is maybe also a bit different.
Michael.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-12-19 16:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-13 23:30 bug#74870: cl-labels and cl-flet don't create named blocks Jan Jouleodov via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-14 16:54 ` Eli Zaretskii
2024-12-17 3:23 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-19 0:55 ` Jan Jouleodov via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-19 16:28 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors
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).