diff options
| author | Stefan Monnier | 2012-11-19 12:02:20 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2012-11-19 12:02:20 -0500 |
| commit | bc715d67b3997988e2a48286410d45404e49342c (patch) | |
| tree | caebf53761b7610f0d8c9da489b10a2c273eaebb | |
| parent | d7f2a65cc22f1383b7d9a0e78e7bb90c19f56a39 (diff) | |
| download | emacs-bc715d67b3997988e2a48286410d45404e49342c.tar.gz emacs-bc715d67b3997988e2a48286410d45404e49342c.zip | |
* lisp/emacs-lisp/ert.el (ert--expand-should-1): Adapt to cl-lib.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/emacs-lisp/ert.el | 15 |
2 files changed, 9 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8447be48e14..d88aac7bc61 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-11-19 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * emacs-lisp/ert.el (ert--expand-should-1): Adapt to cl-lib. | ||
| 4 | |||
| 1 | 2012-11-19 Michael Albinus <michael.albinus@gmx.de> | 5 | 2012-11-19 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 6 | ||
| 3 | * net/tramp-sh.el (tramp-do-copy-or-rename-file): If both files | 7 | * net/tramp-sh.el (tramp-do-copy-or-rename-file): If both files |
diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index ff00be7a237..9cbf417d876 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el | |||
| @@ -388,16 +388,11 @@ DATA is displayed to the user and should state the reason of the failure." | |||
| 388 | (defun ert--expand-should-1 (whole form inner-expander) | 388 | (defun ert--expand-should-1 (whole form inner-expander) |
| 389 | "Helper function for the `should' macro and its variants." | 389 | "Helper function for the `should' macro and its variants." |
| 390 | (let ((form | 390 | (let ((form |
| 391 | ;; If `cl-macroexpand' isn't bound, the code that we're | 391 | (macroexpand form (cond |
| 392 | ;; compiling doesn't depend on cl and thus doesn't need an | 392 | ((boundp 'macroexpand-all-environment) |
| 393 | ;; environment arg for `macroexpand'. | 393 | macroexpand-all-environment) |
| 394 | (if (fboundp 'cl-macroexpand) | 394 | ((boundp 'cl-macro-environment) |
| 395 | ;; Suppress warning about run-time call to cl function: we | 395 | cl-macro-environment))))) |
| 396 | ;; only call it if it's fboundp. | ||
| 397 | (with-no-warnings | ||
| 398 | (cl-macroexpand form (and (boundp 'cl-macro-environment) | ||
| 399 | cl-macro-environment))) | ||
| 400 | (macroexpand form)))) | ||
| 401 | (cond | 396 | (cond |
| 402 | ((or (atom form) (ert--special-operator-p (car form))) | 397 | ((or (atom form) (ert--special-operator-p (car form))) |
| 403 | (let ((value (ert--gensym "value-"))) | 398 | (let ((value (ert--gensym "value-"))) |