all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#64290: “named-let” doc bug?
@ 2023-06-25 23:16 Shynur Xie
  2023-06-26 12:19 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Shynur Xie @ 2023-06-25 23:16 UTC (permalink / raw)
  To: 64290

The following code seems fine semantically and grammatically:

    ;; -*- lexical-binding: nil; -*-
    (named-let f ((n 1))
      (dotimes (i n)
        (f 0)))

But it throws error.

Perhaps we should clarify that “‘named-let’ works as expected only
when ‘lexical-binding’ is enabled” in relevant doc?

--
shynur




^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#64290: “named-let” doc bug?
  2023-06-25 23:16 bug#64290: “named-let” doc bug? Shynur Xie
@ 2023-06-26 12:19 ` Eli Zaretskii
  2023-06-26 13:59   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2023-06-26 12:19 UTC (permalink / raw)
  To: Shynur Xie, Stefan Monnier; +Cc: 64290

> From: Shynur Xie <one.last.kiss@outlook.com>
> Date: Sun, 25 Jun 2023 23:16:41 +0000
> msip_labels: 
> 
> The following code seems fine semantically and grammatically:
> 
>     ;; -*- lexical-binding: nil; -*-
>     (named-let f ((n 1))
>       (dotimes (i n)
>         (f 0)))
> 
> But it throws error.
> 
> Perhaps we should clarify that “‘named-let’ works as expected only
> when ‘lexical-binding’ is enabled” in relevant doc?

Stefan, any comments?





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#64290: “named-let” doc bug?
  2023-06-26 12:19 ` Eli Zaretskii
@ 2023-06-26 13:59   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-06-26 15:43     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-06-26 13:59 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Shynur Xie, 64290

>> The following code seems fine semantically and grammatically:
>> 
>>     ;; -*- lexical-binding: nil; -*-
>>     (named-let f ((n 1))
>>       (dotimes (i n)
>>         (f 0)))
>> 
>> But it throws error.
>> 
>> Perhaps we should clarify that “‘named-let’ works as expected only
>> when ‘lexical-binding’ is enabled” in relevant doc?
>
> Stefan, any comments?

That or adding a check in `named-let` and raise an error when applicable.


        Stefan






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#64290: “named-let” doc bug?
  2023-06-26 13:59   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-06-26 15:43     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2023-06-26 15:43 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: one.last.kiss, 64290-done

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Shynur Xie <one.last.kiss@outlook.com>,  64290@debbugs.gnu.org
> Date: Mon, 26 Jun 2023 09:59:13 -0400
> 
> >> The following code seems fine semantically and grammatically:
> >> 
> >>     ;; -*- lexical-binding: nil; -*-
> >>     (named-let f ((n 1))
> >>       (dotimes (i n)
> >>         (f 0)))
> >> 
> >> But it throws error.
> >> 
> >> Perhaps we should clarify that “‘named-let’ works as expected only
> >> when ‘lexical-binding’ is enabled” in relevant doc?
> >
> > Stefan, any comments?
> 
> That or adding a check in `named-let` and raise an error when applicable.

I went with the former on the release branch.  I think raising an
error is only appropriate for the master branch, if we even think it's
a good idea.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-06-26 15:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-25 23:16 bug#64290: “named-let” doc bug? Shynur Xie
2023-06-26 12:19 ` Eli Zaretskii
2023-06-26 13:59   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-06-26 15:43     ` Eli Zaretskii

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.