summaryrefslogtreecommitdiff
path: root/test/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2022-04-26 17:30:29 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2022-04-26 17:36:12 -0400
commit21112e3683dd7c1f88028bac4b1835204b8e30f8 (patch)
tree6e06eaf9cd3f3678df6f25753631aa7cb99dbc6c /test/lisp/emacs-lisp
parentd35b6a49b33b534f7653bec4d03ab2513a15dc4f (diff)
downloademacs-21112e3683dd7c1f88028bac4b1835204b8e30f8.tar.gz
emacs-21112e3683dd7c1f88028bac4b1835204b8e30f8.tar.bz2
emacs-21112e3683dd7c1f88028bac4b1835204b8e30f8.zip
Pretty print OClosure slot accessors
* lisp/emacs-lisp/oclosure.el (oclosure--accessor-cl-print): New function. * lisp/emacs-lisp/cl-print.el (cl-print-object) <accessor>: New method. * test/lisp/emacs-lisp/nadvice-tests.el (advice-test-call-interactively): Avoid `defun` within a function.
Diffstat (limited to 'test/lisp/emacs-lisp')
-rw-r--r--test/lisp/emacs-lisp/nadvice-tests.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/lisp/emacs-lisp/nadvice-tests.el b/test/lisp/emacs-lisp/nadvice-tests.el
index f21624cfd87..1185bee447b 100644
--- a/test/lisp/emacs-lisp/nadvice-tests.el
+++ b/test/lisp/emacs-lisp/nadvice-tests.el
@@ -153,13 +153,13 @@ function being an around advice."
(ert-deftest advice-test-call-interactively ()
"Check interaction between advice on call-interactively and called-interactively-p."
- (defun sm-test7.4 () (interactive) (cons 1 (called-interactively-p)))
- (let ((old (symbol-function 'call-interactively)))
+ (let ((sm-test7.4 (lambda () (interactive) (cons 1 (called-interactively-p))))
+ (old (symbol-function 'call-interactively)))
(unwind-protect
(progn
(advice-add 'call-interactively :before #'ignore)
- (should (equal (sm-test7.4) '(1 . nil)))
- (should (equal (call-interactively 'sm-test7.4) '(1 . t))))
+ (should (equal (funcall sm-test7.4) '(1 . nil)))
+ (should (equal (call-interactively sm-test7.4) '(1 . t))))
(advice-remove 'call-interactively #'ignore)
(should (eq (symbol-function 'call-interactively) old)))))