diff lisp/cl-macs.el @ 5614:281bf2b87915

Call #'cl-macroexpand-all in #'cl-transform-function-property 2011-12-21 Aidan Kehoe <kehoea@parhasard.net> * cl-macs.el (cl-transform-function-property): Call #'cl-macroexpand-all when doing this, avoiding unpleasantness with defsetf and lexical variables. * cl-macs.el (assert): The previous change meant #'remove-if isn't necessarily available yet; use the :key argument with #'remove* instead.
author Aidan Kehoe <kehoea@parhasard.net>
date Wed, 21 Dec 2011 16:54:30 +0000
parents 3152c2c21461
children b0d712bbc2a6
line wrap: on
line diff
--- a/lisp/cl-macs.el	Tue Dec 13 20:42:30 2011 +0000
+++ b/lisp/cl-macs.el	Wed Dec 21 16:54:30 2011 +0000
@@ -292,7 +292,9 @@
        symbol-or-lambda)))
 
 (defun cl-transform-function-property (func prop form)
-  `(put ',func ',prop #'(lambda ,@(cdr (cl-transform-lambda form func)))))
+  (cl-macroexpand-all
+  `(put ',func ',prop #'(lambda ,@(cdr (cl-transform-lambda form func))))
+  byte-compile-macro-environment))
 
 (defconst lambda-list-keywords
   '(&optional &rest &key &allow-other-keys &aux &whole &body &environment))
@@ -3054,7 +3056,9 @@
 omitted, a default message listing FORM itself is used."
   (and (or (not (cl-compiling-file))
 	   (< cl-optimize-speed 3) (= cl-optimize-safety 3))
-       (let ((sargs (and show-args (remove-if #'cl-const-expr-p (cdr form)))))
+       (let ((sargs (and show-args
+                         ;; #'remove-if isn't necessarily available yet.
+                         (remove* t (cdr form) :key #'cl-const-expr-p))))
 	 (list 'progn
 	       (list 'or form
 		     (if string