emacs/test/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
..
align-resources Add some tests for align.el 2020-12-29 08:38:25 +01:00
auth-source-resources Move netrc tests to auth-source-tests.el 2022-08-04 17:33:34 +02:00
bookmark-resources Add ability to mark/unmark/delete all bookmarks 2020-08-09 15:13:05 -05:00
calc ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calendar ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
cedet ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
custom-resources Avoid saving session customizations in the custom-file 2021-05-10 13:33:32 +02:00
dired-resources/insert-directory Change how Dired displays available space 2021-12-01 23:27:19 +01:00
emacs-lisp nadvice: Fix bug#61179 2023-02-04 11:23:31 -05:00
emulation ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
epg-resources Replace aging OpenPGP artifacts in the epg tests. 2022-10-06 14:53:39 +02:00
erc ; Fix filename mismatches in prop lines of ERC tests 2023-01-24 20:15:18 -08:00
eshell During completion, convert all Eshell arguments to strings 2023-01-30 17:49:11 -08:00
faces-resources ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
files-resources * test/lisp/files-resources/compile-utf8.el: Use lexical-binding 2022-05-26 12:16:04 -04:00
gnus ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
hfy-cmap-resources * test/lisp/hfy-cmap-resources/rgb.txt: Add comment line. 2020-11-12 03:20:39 +01:00
image ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
international Add test suite for sgml-html-meta-auto-coding-function 2023-01-22 16:06:39 +02:00
loadhist-resources ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
mail ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
mh-e ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
minibuffer-resources Move more test data to follow our conventions 2020-10-23 21:07:26 +02:00
net Handle large process output strings for Tramp 2023-02-01 18:40:11 +01:00
nxml ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
obsolete ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
org ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
pcmpl-linux-resources Use lexical-binding in pcmpl-linux.el and add tests 2020-09-02 12:53:02 +02:00
play ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
progmodes Add test for java indentation (bug#61115) 2023-02-04 09:26:54 +01:00
saveplace-resources Use lexical-binding in saveplace.el and add tests 2020-08-08 01:40:38 +02:00
so-long-tests ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
term ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
textmodes ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
time-resources Add missed file needed by time-tests.el 2020-10-22 18:51:00 +02:00
url Merge from origin/emacs-29 2023-01-01 05:47:47 -05:00
use-package ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
vc ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
xdg-resources Move more test data to follow our conventions 2020-10-23 21:07:26 +02:00
abbrev-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
align-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
allout-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
allout-widgets-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
ansi-color-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
ansi-osc-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
apropos-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
arc-mode-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
auth-source-pass-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
auth-source-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
autoinsert-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
autorevert-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
battery-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
bookmark-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
buff-menu-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
button-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
calculator-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
char-fold-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
color-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
comint-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
completion-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
cus-edit-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
custom-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
dabbrev-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
delim-col-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
descr-text-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
desktop-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
dired-aux-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
dired-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
dired-x-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
dnd-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
dom-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
edmacro-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
electric-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
elide-head-tests.el Merge from origin/emacs-29 2023-01-01 05:47:47 -05:00
env-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
epg-config-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
epg-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
faces-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
ffap-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
filenotify-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
files-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
files-x-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
find-cmd-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
font-lock-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
format-spec-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
help-fns-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
help-mode-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
help-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
hfy-cmap-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
hi-lock-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
hl-line-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
htmlfontify-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
ibuffer-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
ido-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
image-file-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
image-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
imenu-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
info-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
info-xref-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
isearch-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
jit-lock-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
json-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
jsonrpc-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
kmacro-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
loadhist-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
lpr-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
ls-lisp-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
man-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
md4-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
minibuffer-tests.el Fix the case in first-completion revealed by minibuffer-tests 2023-01-14 20:56:33 +02:00
misc-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
mouse-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
mwheel-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
newcomment-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
obarray-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
paren-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
password-cache-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
pcmpl-linux-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
pcomplete-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
proced-tests.el Preserve the window position with proced (bug#60381) 2023-01-14 10:36:15 +02:00
ps-print-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
register-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
repeat-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
replace-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
rot13-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
saveplace-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
scroll-lock-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
server-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
ses-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
shadowfile-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
shell-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
simple-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
sort-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
soundex-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
startup-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
subr-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
tab-bar-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
tabify-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
tar-mode-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
tempo-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
term-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
thingatpt-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
thread-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
time-stamp-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
time-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
timezone-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
version-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
wdired-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
whitespace-tests.el Merge from origin/emacs-29 2023-01-01 05:47:47 -05:00
wid-edit-tests.el Fix `pr-interface' 2023-01-06 10:06:25 +01:00
x-dnd-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
xdg-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
xml-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
xt-mouse-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
yank-media-tests.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00