Preserve setf semantics in 'substring', 'cons', 'logand' expanders
* doc/lispref/variables.texi (Adding Generalized Variables): Fix example. * lisp/emacs-lisp/cl-lib.el (substring) * lisp/emacs-lisp/gv.el (cons, logand): Return the value being assigned, as specified for 'setf'. (bug#35546)
This commit is contained in:
parent
f3e29733bb
commit
0e01d5aa72
3 changed files with 22 additions and 10 deletions
|
@ -619,8 +619,11 @@ If ALIST is non-nil, the new pairs are prepended to it."
|
|||
(macroexp-let2* nil ((start from) (end to))
|
||||
(funcall do `(substring ,getter ,start ,end)
|
||||
(lambda (v)
|
||||
(funcall setter `(cl--set-substring
|
||||
,getter ,start ,end ,v))))))))
|
||||
(macroexp-let2 nil v v
|
||||
`(progn
|
||||
,(funcall setter `(cl--set-substring
|
||||
,getter ,start ,end ,v))
|
||||
,v))))))))
|
||||
|
||||
;;; Miscellaneous.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue