* lisp/emacs-lisp/ert.el (ert--expand-should-1): Adapt to cl-lib.
This commit is contained in:
parent
d7f2a65cc2
commit
bc715d67b3
2 changed files with 9 additions and 10 deletions
|
@ -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>
|
2012-11-19 Michael Albinus <michael.albinus@gmx.de>
|
||||||
|
|
||||||
* net/tramp-sh.el (tramp-do-copy-or-rename-file): If both files
|
* net/tramp-sh.el (tramp-do-copy-or-rename-file): If both files
|
||||||
|
|
|
@ -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)
|
(defun ert--expand-should-1 (whole form inner-expander)
|
||||||
"Helper function for the `should' macro and its variants."
|
"Helper function for the `should' macro and its variants."
|
||||||
(let ((form
|
(let ((form
|
||||||
;; If `cl-macroexpand' isn't bound, the code that we're
|
(macroexpand form (cond
|
||||||
;; compiling doesn't depend on cl and thus doesn't need an
|
((boundp 'macroexpand-all-environment)
|
||||||
;; environment arg for `macroexpand'.
|
macroexpand-all-environment)
|
||||||
(if (fboundp 'cl-macroexpand)
|
((boundp 'cl-macro-environment)
|
||||||
;; Suppress warning about run-time call to cl function: we
|
cl-macro-environment)))))
|
||||||
;; only call it if it's fboundp.
|
|
||||||
(with-no-warnings
|
|
||||||
(cl-macroexpand form (and (boundp 'cl-macro-environment)
|
|
||||||
cl-macro-environment)))
|
|
||||||
(macroexpand form))))
|
|
||||||
(cond
|
(cond
|
||||||
((or (atom form) (ert--special-operator-p (car form)))
|
((or (atom form) (ert--special-operator-p (car form)))
|
||||||
(let ((value (ert--gensym "value-")))
|
(let ((value (ert--gensym "value-")))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue