mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
New macro macroexp-let2*
* emacs-lisp/macroexp.el (macroexp-let2*): New macro. * window.el (with-temp-buffer-window) (with-current-buffer-window, with-displayed-buffer-window): * emacs-lisp/cl-macs.el (cl--compiler-macro-adjoin): * emacs-lisp/cl-lib.el (substring): * emacs-lisp/cl-extra.el (cl-getf): Use it.
This commit is contained in:
parent
d71a2d495f
commit
6dbaf04719
6 changed files with 76 additions and 60 deletions
|
|
@ -723,12 +723,11 @@ If ALIST is non-nil, the new pairs are prepended to it."
|
|||
(gv-define-expander substring
|
||||
(lambda (do place from &optional to)
|
||||
(gv-letplace (getter setter) place
|
||||
(macroexp-let2 nil start from
|
||||
(macroexp-let2 nil end to
|
||||
(funcall do `(substring ,getter ,start ,end)
|
||||
(lambda (v)
|
||||
(funcall setter `(cl--set-substring
|
||||
,getter ,start ,end ,v)))))))))
|
||||
(macroexp-let2* nil ((start from) (end to))
|
||||
(funcall do `(substring ,getter ,start ,end)
|
||||
(lambda (v)
|
||||
(funcall setter `(cl--set-substring
|
||||
,getter ,start ,end ,v))))))))
|
||||
|
||||
;;; Miscellaneous.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue