diff options
| author | Leo Liu | 2014-06-06 07:08:59 +0800 |
|---|---|---|
| committer | Leo Liu | 2014-06-06 07:08:59 +0800 |
| commit | d4e355b45d82104ea29cd31becb4b5d0fc0325b8 (patch) | |
| tree | 106e4c63e5ba085d94f4fa7e1d67a1e34bd35678 | |
| parent | dd97cafcf2acb737a8284dc0f582612767c47d14 (diff) | |
| download | emacs-d4e355b45d82104ea29cd31becb4b5d0fc0325b8.tar.gz emacs-d4e355b45d82104ea29cd31becb4b5d0fc0325b8.zip | |
* emacs-lisp/cl-macs.el (cl-macrolet): Simplify last change.
| -rw-r--r-- | lisp/emacs-lisp/cl-macs.el | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 299cffc83aa..ce54337a3b1 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el | |||
| @@ -1886,15 +1886,13 @@ This is like `cl-flet', but for macros instead of functions. | |||
| 1886 | cl-declarations body))) | 1886 | cl-declarations body))) |
| 1887 | (if (cdr bindings) | 1887 | (if (cdr bindings) |
| 1888 | `(cl-macrolet (,(car bindings)) (cl-macrolet ,(cdr bindings) ,@body)) | 1888 | `(cl-macrolet (,(car bindings)) (cl-macrolet ,(cdr bindings) ,@body)) |
| 1889 | (let ((progn-maybe (lambda (body) | 1889 | (if (null bindings) (macroexp-progn body) |
| 1890 | (if (cdr body) (cons 'progn body) (car body))))) | 1890 | (let* ((name (caar bindings)) |
| 1891 | (if (null bindings) (funcall progn-maybe body) | 1891 | (res (cl--transform-lambda (cdar bindings) name))) |
| 1892 | (let* ((name (caar bindings)) | 1892 | (eval (car res)) |
| 1893 | (res (cl--transform-lambda (cdar bindings) name))) | 1893 | (macroexpand-all (macroexp-progn body) |
| 1894 | (eval (car res)) | 1894 | (cons (cons name `(lambda ,@(cdr res))) |
| 1895 | (macroexpand-all (funcall progn-maybe body) | 1895 | macroexpand-all-environment)))))) |
| 1896 | (cons (cons name `(lambda ,@(cdr res))) | ||
| 1897 | macroexpand-all-environment))))))) | ||
| 1898 | 1896 | ||
| 1899 | (defconst cl--old-macroexpand | 1897 | (defconst cl--old-macroexpand |
| 1900 | (if (and (boundp 'cl--old-macroexpand) | 1898 | (if (and (boundp 'cl--old-macroexpand) |