summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/macroexp.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2012-06-07 22:54:35 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2012-06-07 22:54:35 -0400
commitde7e2b368752bfc3cef17a8c82f6b3aec72bc649 (patch)
tree744eda5cd46648391762c68625e97958ce2cc7f5 /lisp/emacs-lisp/macroexp.el
parent4f18a4ed84d7268090a92a194dcda40cae1197dd (diff)
downloademacs-de7e2b368752bfc3cef17a8c82f6b3aec72bc649.tar.gz
emacs-de7e2b368752bfc3cef17a8c82f6b3aec72bc649.tar.bz2
emacs-de7e2b368752bfc3cef17a8c82f6b3aec72bc649.zip
Get rid of cl-lexical-let, keeping only lexical-let for compatibility.
* lisp/emacs-lisp/cl-macs.el: Provide itself. (cl--labels-convert-cache): New var. (cl--labels-convert): New function. (cl-flet, cl-labels): New implementation with new semantics, relying on lexical-binding. * lisp/emacs-lisp/cl.el: Mark compatibility aliases as obsolete. (cl-closure-vars, cl--function-convert-cache) (cl--function-convert): Move from cl-macs.el. (lexical-let, lexical-let*, flet, labels): Move from cl-macs.el and rename by removing the "cl-" prefix. * lisp/emacs-lisp/macroexp.el (macroexp-unprogn): New function.
Diffstat (limited to 'lisp/emacs-lisp/macroexp.el')
-rw-r--r--lisp/emacs-lisp/macroexp.el4
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el
index 115af33fb6c..ca6a04d605b 100644
--- a/lisp/emacs-lisp/macroexp.el
+++ b/lisp/emacs-lisp/macroexp.el
@@ -231,6 +231,10 @@ definitions to shadow the loaded ones for use in file byte-compilation."
"Return an expression equivalent to `(progn ,@EXPS)."
(if (cdr exps) `(progn ,@exps) (car exps)))
+(defun macroexp-unprogn (exp)
+ "Turn EXP into a list of expressions to execute in sequence."
+ (if (eq (car-safe exp) 'progn) (cdr exp) (list exp)))
+
(defun macroexp-let* (bindings exp)
"Return an expression equivalent to `(let* ,bindings ,exp)."
(cond