diff options
author | Leo Liu <sdl.web@gmail.com> | 2014-11-24 22:57:53 +0800 |
---|---|---|
committer | Leo Liu <sdl.web@gmail.com> | 2014-11-24 23:01:05 +0800 |
commit | 6dbaf0471927829126025f57315db02d78255790 (patch) | |
tree | 1fd4f11c491e1e95b86003c6f190f7140e5a96c8 /lisp/emacs-lisp/macroexp.el | |
parent | d71a2d495f688083faa97f7ea305fdc6b595750c (diff) | |
download | emacs-6dbaf0471927829126025f57315db02d78255790.tar.gz |
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/macroexp.el')
-rw-r--r-- | lisp/emacs-lisp/macroexp.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el index a1dc6fa05b2..b40e44ee90f 100644 --- a/lisp/emacs-lisp/macroexp.el +++ b/lisp/emacs-lisp/macroexp.el @@ -344,6 +344,15 @@ be skipped; if nil, as is usual, `macroexp-const-p' is used." (macroexp-let* (list (list ,var ,expsym)) ,bodysym))))) +(defmacro macroexp-let2* (test bindings &rest body) + "Bind each binding in BINDINGS as `macroexp-let2' does." + (declare (indent 2) (debug (sexp (&rest (sexp form)) body))) + (pcase-exhaustive bindings + (`nil (macroexp-progn body)) + (`((,var ,exp) . ,tl) + `(macroexp-let2 ,test ,var ,exp + (macroexp-let2* ,test ,tl ,@body))))) + (defun macroexp--maxsize (exp size) (cond ((< size 0) size) ((symbolp exp) (1- size)) |