[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#49651: 28.0.50; setf bug
From: |
Michael Heerdegen |
Subject: |
bug#49651: 28.0.50; setf bug |
Date: |
Tue, 20 Jul 2021 02:29:30 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Devon Sean McCullough <Emacs-Hacker2020@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.
- bug#49651: 28.0.50; setf bug, Devon Sean McCullough, 2021/07/19
- bug#49651: 28.0.50; setf bug,
Michael Heerdegen <=
- bug#49651: 28.0.50; setf bug, Lars Ingebrigtsen, 2021/07/20
- bug#49651: 28.0.50; setf bug, Michael Heerdegen, 2021/07/20
- bug#49651: 28.0.50; setf bug, Lars Ingebrigtsen, 2021/07/21
- bug#49651: 28.0.50; setf bug, Stefan Monnier, 2021/07/21
- bug#49651: 28.0.50; setf bug, Lars Ingebrigtsen, 2021/07/21
- bug#49651: 28.0.50; setf bug, Stefan Monnier, 2021/07/21
- bug#49651: 28.0.50; setf bug, Devon Sean McCullough, 2021/07/21
- bug#49651: 28.0.50; setf bug, Lars Ingebrigtsen, 2021/07/21
- bug#49651: 28.0.50; setf bug, Stefan Monnier, 2021/07/21
- bug#49651: 28.0.50; setf bug, Lars Ingebrigtsen, 2021/07/21