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.
This commit is contained in:
Stefan Monnier 2012-06-07 22:54:35 -04:00
parent 4f18a4ed84
commit de7e2b3687
5 changed files with 271 additions and 209 deletions

View file

@ -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