summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/cl-lib.el
diff options
context:
space:
mode:
authorLeo Liu <sdl.web@gmail.com>2014-11-24 22:57:53 +0800
committerLeo Liu <sdl.web@gmail.com>2014-11-24 23:01:05 +0800
commit6dbaf0471927829126025f57315db02d78255790 (patch)
tree1fd4f11c491e1e95b86003c6f190f7140e5a96c8 /lisp/emacs-lisp/cl-lib.el
parentd71a2d495f688083faa97f7ea305fdc6b595750c (diff)
downloademacs-6dbaf0471927829126025f57315db02d78255790.tar.gz
emacs-6dbaf0471927829126025f57315db02d78255790.tar.bz2
emacs-6dbaf0471927829126025f57315db02d78255790.zip
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.
Diffstat (limited to 'lisp/emacs-lisp/cl-lib.el')
-rw-r--r--lisp/emacs-lisp/cl-lib.el11
1 files changed, 5 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/cl-lib.el b/lisp/emacs-lisp/cl-lib.el
index c7d21c76fc1..cc61597d313 100644
--- a/lisp/emacs-lisp/cl-lib.el
+++ b/lisp/emacs-lisp/cl-lib.el
@@ -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.