GNU bug report logs - #49651
28.0.50; setf bug

Previous Next

Package: emacs;

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

Date: Mon, 19 Jul 2021 21:46:01 UTC

Severity: normal

Found in version 28.0.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Devon Sean McCullough <Emacs-Hacker2020 <at> jovi.net>
Cc: 49651 <at> debbugs.gnu.org
Subject: Re: bug#49651: 28.0.50; setf bug
Date: Tue, 20 Jul 2021 02:29:30 +0200
Devon Sean McCullough <Emacs-Hacker2020 <at> jovi.net> writes:

> $ /Applications/Emacs-28.0.50.app/Contents/MacOS/Emacs -Q --batch --eval '(setf (getenv "FOO") "BAR")'
> Debugger entered--Lisp error: (void-function \(setf\ getenv\))
>   (\(setf\ getenv\) "BAR" "FOO")
>   (setf (getenv "FOO") "BAR")

> P.S. The fix is obvious:
>
> lisp/emacs-lisp/cl-lib.el
> ⋮
> ;; These used to be in cl-macs.el since all macros that use them (like setf)
> ;; were autoloaded from cl-macs.el.  But now that setf, push, and pop are in
> ;; core Elisp, they need to either be right here or be autoloaded via
> ;; cl-loaddefs.el, which is more trouble than it is worth.
> ⋮
> (gv-define-simple-setter getenv setenv t)

So the error does only occur before you require cl-lib, and your
suggestion is to do what the comment describes as trouble - correct?

I'm not sure of what kind that trouble is, moving such definitions can
have effects on bootstrapping or startup, that's beyond my knowledge.

Any opinions?

> P.P.S.  Perhaps describe-function, M-. and the like should mention
> setters?

I would like it when C-h f would tell about gv expanders.  Not trivial
though since most gv expanders are anonymous functions (like that of
`getenv').


Michael.




This bug report was last modified 3 years and 299 days ago.

Previous Next


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