diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-06-07 22:54:35 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-06-07 22:54:35 -0400 |
commit | de7e2b368752bfc3cef17a8c82f6b3aec72bc649 (patch) | |
tree | 744eda5cd46648391762c68625e97958ce2cc7f5 /lisp/emacs-lisp/cl-loaddefs.el | |
parent | 4f18a4ed84d7268090a92a194dcda40cae1197dd (diff) | |
download | emacs-de7e2b368752bfc3cef17a8c82f6b3aec72bc649.tar.gz |
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/cl-loaddefs.el')
-rw-r--r-- | lisp/emacs-lisp/cl-loaddefs.el | 41 |
1 files changed, 8 insertions, 33 deletions
diff --git a/lisp/emacs-lisp/cl-loaddefs.el b/lisp/emacs-lisp/cl-loaddefs.el index 2d7c9153318..95716ae2e29 100644 --- a/lisp/emacs-lisp/cl-loaddefs.el +++ b/lisp/emacs-lisp/cl-loaddefs.el @@ -258,13 +258,12 @@ Remove from SYMBOL's plist the property PROPNAME and its value. ;;;;;; cl-letf cl-rotatef cl-shiftf cl-remf cl-do-pop cl-psetf cl-setf ;;;;;; cl-get-setf-method cl-defsetf cl-define-setf-expander cl-declare ;;;;;; cl-the cl-locally cl-multiple-value-setq cl-multiple-value-bind -;;;;;; cl-lexical-let* cl-lexical-let cl-symbol-macrolet cl-macrolet -;;;;;; cl-labels cl-flet cl-progv cl-psetq cl-do-all-symbols cl-do-symbols -;;;;;; cl-dotimes cl-dolist cl-do* cl-do cl-loop cl-return-from -;;;;;; cl-return cl-block cl-etypecase cl-typecase cl-ecase cl-case -;;;;;; cl-load-time-value cl-eval-when cl-destructuring-bind cl-function -;;;;;; cl-defmacro cl-defun cl-gentemp cl-gensym) "cl-macs" "cl-macs.el" -;;;;;; "c1e8e5391e374630452ab3d78e527086") +;;;;;; cl-symbol-macrolet cl-macrolet cl-labels cl-flet cl-progv +;;;;;; cl-psetq cl-do-all-symbols cl-do-symbols cl-dotimes cl-dolist +;;;;;; cl-do* cl-do cl-loop cl-return-from cl-return cl-block cl-etypecase +;;;;;; cl-typecase cl-ecase cl-case cl-load-time-value cl-eval-when +;;;;;; cl-destructuring-bind cl-function cl-defmacro cl-defun cl-gentemp +;;;;;; cl-gensym) "cl-macs" "cl-macs.el" "4c0f605e3c7454488cc9d498b611f422") ;;; Generated autoloads from cl-macs.el (autoload 'cl-gensym "cl-macs" "\ @@ -485,10 +484,7 @@ a `let' form, except that the list of symbols can be computed at run-time. (autoload 'cl-flet "cl-macs" "\ Make temporary function definitions. -This is an analogue of `let' that operates on the function cell of FUNC -rather than its value cell. The FORMs are evaluated with the specified -function definitions in place, then the definitions are undone (the FUNCs -go back to their previous definitions, or lack thereof). +Like `cl-labels' but the definitions are not recursive. \(fn ((FUNC ARGLIST BODY...) ...) FORM...)" nil t) @@ -496,8 +492,7 @@ go back to their previous definitions, or lack thereof). (autoload 'cl-labels "cl-macs" "\ Make temporary function bindings. -This is like `cl-flet', except the bindings are lexical instead of dynamic. -Unlike `cl-flet', this macro is fully compliant with the Common Lisp standard. +The bindings can be recursive. Assumes the use of `lexical-binding'. \(fn ((FUNC ARGLIST BODY...) ...) FORM...)" nil t) @@ -520,26 +515,6 @@ by EXPANSION, and (setq NAME ...) will act like (cl-setf EXPANSION ...). (put 'cl-symbol-macrolet 'lisp-indent-function '1) -(autoload 'cl-lexical-let "cl-macs" "\ -Like `let', but lexically scoped. -The main visible difference is that lambdas inside BODY will create -lexical closures as in Common Lisp. - -\(fn BINDINGS BODY)" nil t) - -(put 'cl-lexical-let 'lisp-indent-function '1) - -(autoload 'cl-lexical-let* "cl-macs" "\ -Like `let*', but lexically scoped. -The main visible difference is that lambdas inside BODY, and in -successive bindings within BINDINGS, will create lexical closures -as in Common Lisp. This is similar to the behavior of `let*' in -Common Lisp. - -\(fn BINDINGS BODY)" nil t) - -(put 'cl-lexical-let* 'lisp-indent-function '1) - (autoload 'cl-multiple-value-bind "cl-macs" "\ Collect multiple return values. FORM must return a list; the BODY is then executed with the first N elements |