1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-10 08:52:40 -07:00
emacs/test/lisp
Alan Mackenzie c44903b011 Preserve source position of macro calls in macro expansions
This allows the byte compiler to give correct positions, those
of the invoking forms, when an error or warning is caused by
the innards of the invoked macros.

This fixes bug#73725 and bug#73746.

* lisp/emacs-lisp/macroexp.el (macroexp--posify-form-1)
(macroexp--posify-form): New functions.
(macroexp-preserve-posification): New macro.
(macroexp--compiler-macro, macroexp-macroexpand): Use the new
macro to preserve a calling form's position.

* lisp/emacs-lisp/byte-opt.el (byte-optimize-form): Use the new
macro to preserve source positions.

* test/lisp/emacs-lisp/bytecomp-resources/bad-error-position.el
* test/lisp/emacs-lisp/bytecomp-resources/bad-error-position-2.el:
New test files.
* test/lisp/emacs-lisp/bytecomp-tests.el: Two new tests using
the new test files.
2025-07-13 20:28:51 +00:00
..
align-resources
auth-source-resources
bookmark-resources
calc
calendar
cedet
custom-resources
dabbrev-resources
dired-resources/insert-directory
emacs-lisp Preserve source position of macro calls in macro expansions 2025-07-13 20:28:51 +00:00
emulation
epg-resources
erc
eshell
faces-resources
files-resources
gnus
hfy-cmap-resources
image
international
loadhist-resources
mail
mh-e
minibuffer-resources
net
nxml
obsolete
org
pcmpl-linux-resources
play
progmodes
saveplace-resources
so-long-tests
term
textmodes
time-resources
url
use-package
vc
xdg-resources
abbrev-tests.el
align-tests.el
allout-tests.el
allout-widgets-tests.el
ansi-color-tests.el
ansi-osc-tests.el
apropos-tests.el
arc-mode-tests.el
auth-source-pass-tests.el
auth-source-tests.el
autoinsert-tests.el
autorevert-tests.el
battery-tests.el
bookmark-tests.el
buff-menu-tests.el
button-tests.el
calculator-tests.el
char-fold-tests.el
color-tests.el
comint-tests.el
completion-preview-tests.el
completion-tests.el
cus-edit-tests.el
custom-tests.el
dabbrev-tests.el
delim-col-tests.el
descr-text-tests.el
desktop-tests.el
dired-aux-tests.el
dired-tests.el
dired-x-tests.el
dnd-tests.el
dom-tests.el
edmacro-tests.el
electric-tests.el
elide-head-tests.el
env-tests.el
epg-config-tests.el
epg-tests.el
faces-tests.el
ffap-tests.el
filenotify-tests.el
files-tests.el
files-x-tests.el
find-cmd-tests.el
follow-tests.el
font-lock-tests.el
format-spec-tests.el
help-fns-tests.el
help-mode-tests.el
help-tests.el
hfy-cmap-tests.el
hi-lock-tests.el
hl-line-tests.el
htmlfontify-tests.el
ibuffer-tests.el
ido-tests.el
image-file-tests.el
image-tests.el
imenu-tests.el
info-tests.el
info-xref-tests.el
isearch-tests.el
jit-lock-tests.el
json-tests.el
jsonrpc-tests.el
kmacro-tests.el
loadhist-tests.el
lpr-tests.el
ls-lisp-tests.el
man-tests.el
md4-tests.el
minibuffer-tests.el
misc-tests.el
mouse-tests.el
mwheel-tests.el
newcomment-tests.el
obarray-tests.el
paren-tests.el
password-cache-tests.el
pcmpl-linux-tests.el
pcomplete-tests.el
proced-tests.el
ps-print-tests.el
register-tests.el
repeat-tests.el
replace-tests.el
rot13-tests.el
savehist-tests.el
saveplace-tests.el
scroll-lock-tests.el
server-tests.el
ses-tests.el
shadowfile-tests.el
shell-tests.el
simple-tests.el
sort-tests.el
soundex-tests.el
speedbar-tests.el
sqlite-tests.el
startup-tests.el
subr-tests.el
tab-bar-tests.el
tabify-tests.el
tar-mode-tests.el
tempo-tests.el
term-tests.el
thingatpt-tests.el
thread-tests.el
time-stamp-tests.el
time-tests.el
timezone-tests.el
uniquify-tests.el
version-tests.el
visual-wrap-tests.el
wdired-tests.el
which-key-tests.el
whitespace-tests.el
wid-edit-tests.el
winner-tests.el
x-dnd-tests.el
xdg-tests.el
xml-tests.el
xt-mouse-tests.el
yank-media-tests.el