GNU bug report logs - #77348
30.1; cl-labels

Previous Next

Package: emacs;

Reported by: Devon Sean McCullough <Emacs-hacker2023 <at> jovi.net>

Date: Fri, 28 Mar 2025 23:11:02 UTC

Severity: normal

Found in version 30.1

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 77348 in the body.
You can then email your comments to 77348 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#77348; Package emacs. (Fri, 28 Mar 2025 23:11:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Devon Sean McCullough <Emacs-hacker2023 <at> jovi.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 28 Mar 2025 23:11:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Devon Sean McCullough <Emacs-hacker2023 <at> jovi.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 30.1; cl-labels
Date: Fri, 28 Mar 2025 18:10:16 -0500
Instrument the following forms for edebug,
e.g., by C-u M-x eval-defun RET
with point on the form.

(cl-labels ((foo (bar))))
;; (error "Eager macro-expansion failure: (error \"Invalid argument 
name: 1\")")

;; should work same as
(cl-labels ((foo (bar) nil)))
;; nil after manually stepping

		Peace
			--Devon

P.S.  Especially troubling is this variation which fails to manifest the 
bug:

(cl-labels ((foo (function))))
;; nil after manually stepping

In GNU Emacs 30.1 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60
 Version 10.14.6 (Build 18G9323)) of 2025-02-24 built on
 builder10-14.lan
Windowing system distributor 'Apple', version 10.3.1671
System Description:  Mac OS X 10.14.6

Configured using:
 'configure --with-ns '--enable-locallisppath=/Library/Application
 Support/Emacs/${version}/site-lisp:/Library/Application
 Support/Emacs/site-lisp' --with-modules 'CFLAGS=-DFD_SETSIZE=10000
 -DDARWIN_UNLIMITED_SELECT' --with-x-toolkit=no'

Configured features:
ACL GLIB GMP GNUTLS JPEG LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER PNG
RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  minibuffer-regexp-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
epg-config gnus-util text-property-search mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-fns radix-tree
cl-print byte-opt bytecomp byte-compile cl-seq cl-macs gv edebug debug
backtrace help-mode find-func time-date subr-x cl-loaddefs cl-lib rmc
iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook
vc-hooks lisp-float-type elisp-mode mwheel term/ns-win ns-win
ucs-normalize mule-util term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads kqueue cocoa ns multi-tty
make-network-process emacs)

Memory information:
((conses 16 59975 9228) (symbols 48 7064 0) (strings 32 17818 1774)
 (string-bytes 1 468489) (vectors 16 13053)
 (vector-slots 8 143071 8790) (floats 8 27 33) (intervals 56 615 18)
 (buffers 992 12))




Information forwarded to monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org:
bug#77348; Package emacs. (Sun, 30 Mar 2025 04:14:03 GMT) Full text and rfc822 format available.

Message #8 received at 77348 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Devon Sean McCullough <Emacs-hacker2023 <at> jovi.net>
Cc: 77348 <at> debbugs.gnu.org
Subject: Re: bug#77348: 30.1; cl-labels
Date: Sun, 30 Mar 2025 06:14:49 +0200
Hello Devon,

> Instrument the following forms for edebug,
> e.g., by C-u M-x eval-defun RET
> with point on the form.
>
> (cl-labels ((foo (bar))))
> ;; (error "Eager macro-expansion failure: (error \"Invalid argument
>    name: 1\")")
>
> ;; should work same as
> (cl-labels ((foo (bar) nil)))
> ;; nil after manually stepping

I see a different behavior in master, and I know the edebug spec of
`cl-labels' had been changed recently.  Are you maybe able to try the
master behavior?

@Stefan: did you forget to mention the (FUNC EXP) binding definition
case in the docstring of `cl-labels'?


> P.S.  Especially troubling is this variation which fails to manifest
> the bug:
>
> (cl-labels ((foo (function))))

You are aware that `function' is a special form?


Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77348; Package emacs. (Sun, 30 Mar 2025 04:46:02 GMT) Full text and rfc822 format available.

Message #11 received at 77348 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: Devon Sean McCullough <Emacs-hacker2023 <at> jovi.net>, 77348 <at> debbugs.gnu.org
Subject: Re: bug#77348: 30.1; cl-labels
Date: Sun, 30 Mar 2025 00:45:40 -0400
>> Instrument the following forms for edebug,
>> e.g., by C-u M-x eval-defun RET
>> with point on the form.
>>
>> (cl-labels ((foo (bar))))
>> ;; (error "Eager macro-expansion failure: (error \"Invalid argument
>>    name: 1\")")
>>
>> ;; should work same as
>> (cl-labels ((foo (bar) nil)))
>> ;; nil after manually stepping

In recent Emacs, the above two forms aren't equivalent any more:

    (cl-labels ((foo (bar))))

now defines `foo` as the function returned by calling `bar`.

> @Stefan: did you forget to mention the (FUNC EXP) binding definition
> case in the docstring of `cl-labels'?

Indeed.  Somehow I updated the Texinfo doc but not the docstring.
I just fixed that in `emacs-30`, thanks.


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77348; Package emacs. (Mon, 31 Mar 2025 00:12:04 GMT) Full text and rfc822 format available.

Message #14 received at 77348 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Devon Sean McCullough <Emacs-hacker2023 <at> jovi.net>, 77348 <at> debbugs.gnu.org
Subject: Re: bug#77348: 30.1; cl-labels
Date: Mon, 31 Mar 2025 02:12:21 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> > @Stefan: did you forget to mention the (FUNC EXP) binding definition
> > case in the docstring of `cl-labels'?
>
> Indeed.  Somehow I updated the Texinfo doc but not the docstring.
> I just fixed that in `emacs-30`, thanks.

Thanks.  But something's odd here: I'm absolutely sure that you and I,
we already talked about improving the docstring even further, and we
already had a version with an improved last paragraph.  It said
something like "FUNC is defined in any BODY, as well as FORM or the
evaluation result of any EXP", something like that.  Remember?  It seems
you lost that version and installed something old, or something written
ad-hoc, instead.


Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77348; Package emacs. (Mon, 31 Mar 2025 13:21:02 GMT) Full text and rfc822 format available.

Message #17 received at 77348 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: Devon Sean McCullough <Emacs-hacker2023 <at> jovi.net>, 77348 <at> debbugs.gnu.org
Subject: Re: bug#77348: 30.1; cl-labels
Date: Mon, 31 Mar 2025 09:19:54 -0400
>> > @Stefan: did you forget to mention the (FUNC EXP) binding definition
>> > case in the docstring of `cl-labels'?
>>
>> Indeed.  Somehow I updated the Texinfo doc but not the docstring.
>> I just fixed that in `emacs-30`, thanks.
>
> Thanks.  But something's odd here: I'm absolutely sure that you and I,
> we already talked about improving the docstring even further, and we
> already had a version with an improved last paragraph.  It said
> something like "FUNC is defined in any BODY, as well as FORM or the
> evaluation result of any EXP", something like that.  Remember?  It seems
> you lost that version and installed something old, or something written
> ad-hoc, instead.

It does ring a bell, indeed.  I'll have to try and dig it back up.


        Stefan





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77348; Package emacs. (Wed, 02 Apr 2025 09:14:02 GMT) Full text and rfc822 format available.

Message #20 received at 77348 <at> debbugs.gnu.org (full text, mbox):

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Devon Sean McCullough <Emacs-hacker2023 <at> jovi.net>, 77348 <at> debbugs.gnu.org
Subject: Re: bug#77348: 30.1; cl-labels
Date: Wed, 02 Apr 2025 11:14:24 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> > Thanks.  But something's odd here: I'm absolutely sure that you and I,
> > we already talked about improving the docstring even further, and we
> > already had a version with an improved last paragraph.  It said
> > something like "FUNC is defined in any BODY, as well as FORM or the
> > evaluation result of any EXP", something like that.  Remember?  It seems
> > you lost that version and installed something old, or something written
> > ad-hoc, instead.
>
> It does ring a bell, indeed.  I'll have to try and dig it back up.

Hmm - looks like there had been a merge accident:

  6c411de542d "Merge from origin/emacs-30" (Eli Zaretskii 2025-03-01)

reverted the improved docstring.


Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#77348; Package emacs. (Wed, 02 Apr 2025 12:30:03 GMT) Full text and rfc822 format available.

Message #23 received at 77348 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: monnier <at> iro.umontreal.ca, 77348 <at> debbugs.gnu.org, Emacs-hacker2023 <at> jovi.net
Subject: Re: bug#77348: 30.1; cl-labels
Date: Wed, 02 Apr 2025 15:28:49 +0300
> Cc: Devon Sean McCullough <Emacs-hacker2023 <at> jovi.net>, 77348 <at> debbugs.gnu.org
> Date: Wed, 02 Apr 2025 11:14:24 +0200
> From:  Michael Heerdegen via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
> 
> Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> 
> > > Thanks.  But something's odd here: I'm absolutely sure that you and I,
> > > we already talked about improving the docstring even further, and we
> > > already had a version with an improved last paragraph.  It said
> > > something like "FUNC is defined in any BODY, as well as FORM or the
> > > evaluation result of any EXP", something like that.  Remember?  It seems
> > > you lost that version and installed something old, or something written
> > > ad-hoc, instead.
> >
> > It does ring a bell, indeed.  I'll have to try and dig it back up.
> 
> Hmm - looks like there had been a merge accident:
> 
>   6c411de542d "Merge from origin/emacs-30" (Eli Zaretskii 2025-03-01)
> 
> reverted the improved docstring.

Feel free to fix any such snafus.

(Btw, in general, please make any documentation fixes on the release
branch, not on master.  As a nice bonus, that will make the
probability of such merge problems lower.)




Reply sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
You have taken responsibility. (Wed, 02 Apr 2025 19:11:01 GMT) Full text and rfc822 format available.

Notification sent to Devon Sean McCullough <Emacs-hacker2023 <at> jovi.net>:
bug acknowledged by developer. (Wed, 02 Apr 2025 19:11:02 GMT) Full text and rfc822 format available.

Message #28 received at 77348-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, Emacs-hacker2023 <at> jovi.net,
 77348-done <at> debbugs.gnu.org
Subject: Re: bug#77348: 30.1; cl-labels
Date: Wed, 02 Apr 2025 15:09:46 -0400
> Feel free to fix any such snafus.

Done.

> (Btw, in general, please make any documentation fixes on the release
> branch, not on master.  As a nice bonus, that will make the
> probability of such merge problems lower.)

FWIW, in this case the problem was a doc change done in `master`
(reflecting a change in the code in `master` and thus not applicable to
`emacs-30`) collided with a reflow of the docstring done in `emacs-30`.
So it's the exception that proves the rule.  🙂


        Stefan





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 01 May 2025 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 141 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.