emacs/test/lisp/emacs-lisp
Stefan Monnier c39c26e33f nadvice: Fix bug#61179
Advising interactive forms relies on the ability to distinguish
interactive forms that do nothing else than return a function.
So, be careful to preserve this info.
Furthermore, interactive forms are expected to be evaluated in
the lexical context captured by the closure to which they belong,
so be careful to preserve that context when manipulating those forms.

* lisp/emacs-lisp/cconv.el (cconv-convert, cconv-analyze-form) <lambda>:
Preserve the info that an interactive form does nothing else than
return a function.

* lisp/emacs-lisp/nadvice.el (advice--interactive-form-1): New function.
(advice--interactive-form): Use it.
(advice--make-interactive-form): Refine to also accept function values
quoted with `quote`.  Remove obsolete TODO.

* test/lisp/emacs-lisp/nadvice-tests.el: Don't disallow byte-compilation.
(advice-test-bug61179): New test.

* lisp/emacs-lisp/oclosure.el (cconv--interactive-helper): Allow
the `if` arg to be a form.
* lisp/simple.el (oclosure-interactive-form): Adjust accordingly.
2023-02-04 11:23:31 -05:00
..
bytecomp-resources Don't rewrite set to setq of lexical variables 2022-09-22 14:54:15 +02:00
edebug-resources ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
eieio-tests ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
faceup-resources ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
faceup-tests ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
macroexp-resources ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
package-resources ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
pp-resources Fix pp-emacs-lisp-code printing of cons cells 2022-05-17 19:45:20 +02:00
shadow-resources Use lexical-binding in most remaining emacs-lisp tests 2020-04-30 12:09:51 +02:00
testcover-resources ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
backquote-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
backtrace-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
benchmark-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
bindat-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
bytecomp-tests.el Merge from origin/emacs-29 2023-01-01 05:47:47 -05:00
cconv-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
check-declare-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
checkdoc-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
cl-extra-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
cl-generic-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
cl-lib-tests.el ; * cl-lib-tests.el: Suppress for the right function. 2023-01-03 14:30:16 +01:00
cl-macs-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
cl-preloaded-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
cl-print-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
cl-seq-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
comp-cstr-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
comp-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
copyright-tests.el ; * test/lisp/emacs-lisp/copyright-tests.el: Fix and future-safe. 2023-01-01 13:18:50 +01:00
derived-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
easy-mmode-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
edebug-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
ert-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
ert-x-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
find-func-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
float-sup-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
generator-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
gv-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
hierarchy-tests.el Fix failing test for package Hierarchy 2022-10-28 10:33:18 +03:00
icons-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
let-alist-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
lisp-mnt-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
lisp-mode-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
lisp-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
macroexp-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
map-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
memory-report-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
multisession-tests.el Merge from origin/emacs-29 2023-01-01 05:47:47 -05:00
nadvice-tests.el nadvice: Fix bug#61179 2023-02-04 11:23:31 -05:00
oclosure-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
package-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
pcase-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
pp-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
range-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
regexp-opt-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
ring-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
rmc-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
rx-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
seq-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
shadow-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
shortdoc-tests.el Fix shortdoc-tests failure with respect to regexp-opt-charset 2023-01-01 12:56:51 +01:00
subr-x-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
syntax-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
tabulated-list-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
testcover-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
text-property-search-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
thunk-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
timer-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
unsafep-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
vtable-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
warnings-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00