diff options
author | Stephen Berman <stephen.berman@gmx.net> | 2013-06-21 20:37:42 +0200 |
---|---|---|
committer | Stephen Berman <stephen.berman@gmx.net> | 2013-06-21 20:37:42 +0200 |
commit | 716b665eb3a134a5d1ccefd5d4c735e7e7ef62d5 (patch) | |
tree | ede9da164267b968f3c05e0340ba12e06b8d3516 /lisp/emacs-lisp/cconv.el | |
parent | ebc83885b750d46eb290192ae25f6b9a92bdd15f (diff) | |
parent | cad5d1cb5af7210154814b60825576d14740158f (diff) | |
download | emacs-716b665eb3a134a5d1ccefd5d4c735e7e7ef62d5.tar.gz emacs-716b665eb3a134a5d1ccefd5d4c735e7e7ef62d5.tar.bz2 emacs-716b665eb3a134a5d1ccefd5d4c735e7e7ef62d5.zip |
Merge from trunk.
Diffstat (limited to 'lisp/emacs-lisp/cconv.el')
-rw-r--r-- | lisp/emacs-lisp/cconv.el | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/cconv.el b/lisp/emacs-lisp/cconv.el index 761e33c059d..70fa71a0da4 100644 --- a/lisp/emacs-lisp/cconv.el +++ b/lisp/emacs-lisp/cconv.el @@ -143,7 +143,19 @@ Returns a form where all lambdas don't have any free variables." ;; Analyze form - fill these variables with new information. (cconv-analyse-form form '()) (setq cconv-freevars-alist (nreverse cconv-freevars-alist)) - (cconv-convert form nil nil))) ; Env initially empty. + (prog1 (cconv-convert form nil nil) ; Env initially empty. + (cl-assert (null cconv-freevars-alist))))) + +;;;###autoload +(defun cconv-warnings-only (form) + "Add the warnings that closure conversion would encounter." + (let ((cconv-freevars-alist '()) + (cconv-lambda-candidates '()) + (cconv-captured+mutated '())) + ;; Analyze form - fill these variables with new information. + (cconv-analyse-form form '()) + ;; But don't perform the closure conversion. + form)) (defconst cconv--dummy-var (make-symbol "ignored")) |