]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/ert.el (ert--expand-should-1): Adapt to cl-lib.
authorStefan Monnier <monnier@iro.umontreal.ca>
Mon, 19 Nov 2012 17:02:20 +0000 (12:02 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Mon, 19 Nov 2012 17:02:20 +0000 (12:02 -0500)
lisp/ChangeLog
lisp/emacs-lisp/ert.el

index 8447be48e14620c7c4b07c592eb32edd7ceecac2..d88aac7bc6140e132e733755b83c19de2a82d226 100644 (file)
@@ -1,3 +1,7 @@
+2012-11-19  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * emacs-lisp/ert.el (ert--expand-should-1): Adapt to cl-lib.
+
 2012-11-19  Michael Albinus  <michael.albinus@gmx.de>
 
        * net/tramp-sh.el (tramp-do-copy-or-rename-file): If both files
index ff00be7a2371b2c81af2414ab6113ad3df21dd4f..9cbf417d876ff33fbdcaf7e61f824c04d3605d24 100644 (file)
@@ -388,16 +388,11 @@ DATA is displayed to the user and should state the reason of the failure."
 (defun ert--expand-should-1 (whole form inner-expander)
   "Helper function for the `should' macro and its variants."
   (let ((form
-         ;; If `cl-macroexpand' isn't bound, the code that we're
-         ;; compiling doesn't depend on cl and thus doesn't need an
-         ;; environment arg for `macroexpand'.
-         (if (fboundp 'cl-macroexpand)
-             ;; Suppress warning about run-time call to cl function: we
-             ;; only call it if it's fboundp.
-             (with-no-warnings
-               (cl-macroexpand form (and (boundp 'cl-macro-environment)
-                                         cl-macro-environment)))
-           (macroexpand form))))
+         (macroexpand form (cond
+                            ((boundp 'macroexpand-all-environment)
+                             macroexpand-all-environment)
+                            ((boundp 'cl-macro-environment)
+                             cl-macro-environment)))))
     (cond
      ((or (atom form) (ert--special-operator-p (car form)))
       (let ((value (ert--gensym "value-")))