diff options
author | Štěpán Němec <stepnem@gmail.com> | 2020-04-12 00:27:51 +0200 |
---|---|---|
committer | Štěpán Němec <stepnem@gmail.com> | 2020-08-25 17:59:05 +0200 |
commit | 0e01d5aa723cd50749f9028f0e8ad85a3afe52aa (patch) | |
tree | ec8f562e12be1dc70185801b34c1c373aeab9667 /doc/lispref/variables.texi | |
parent | f3e29733bbe63950b3ef1259744723193ff5f388 (diff) | |
download | emacs-0e01d5aa723cd50749f9028f0e8ad85a3afe52aa.tar.gz emacs-0e01d5aa723cd50749f9028f0e8ad85a3afe52aa.tar.bz2 emacs-0e01d5aa723cd50749f9028f0e8ad85a3afe52aa.zip |
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)
Diffstat (limited to 'doc/lispref/variables.texi')
-rw-r--r-- | doc/lispref/variables.texi | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi index abcd4bbd0f7..94c8c88796f 100644 --- a/doc/lispref/variables.texi +++ b/doc/lispref/variables.texi @@ -2585,8 +2585,11 @@ implemented this way: (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)))))))) @end example @end defmac |