1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-18 11:50:38 -08:00
emacs/test/lisp/emacs-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
..
bytecomp-resources Preserve source position of macro calls in macro expansions 2025-07-13 20:28:51 +00:00
edebug-resources Prefer incf to cl-incf in tests 2025-02-23 00:38:22 +01:00
eieio-tests Call eieio--class-* accessors only on eieio classes (bug#78786) 2025-07-09 15:20:14 +00:00
ert-font-lock-resources Improve ert-font-lock assertion parser (Bug#69714) 2024-03-28 11:40:27 +02:00
ert-resources Add baseline pass/fail tests for `ert-test-erts-file' 2025-05-24 13:08:21 +03:00
faceup-resources Update copyright year to 2025 2025-01-02 18:39:42 +01:00
faceup-tests Update copyright year to 2025 2025-01-02 18:39:42 +01:00
macroexp-resources Update copyright year to 2025 2025-01-02 18:39:42 +01:00
package-resources Update copyright year to 2025 2025-01-02 18:39:42 +01:00
pp-resources Fix pp-emacs-lisp-code printing of cons cells 2022-05-17 19:45:20 +02:00
shadow-resources
testcover-resources Update copyright year to 2025 2025-01-02 18:39:42 +01:00
backquote-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
backtrace-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
benchmark-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
bindat-tests.el Prefer oddp/evenp to free-coding them in tests 2025-02-17 05:37:10 +01:00
byte-run-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
bytecomp-tests.el Preserve source position of macro calls in macro expansions 2025-07-13 20:28:51 +00:00
cconv-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
check-declare-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
checkdoc-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
cl-extra-tests.el Make cl-random behave consistently for unusual arguments (bug#75105) 2025-06-20 06:09:24 +00:00
cl-generic-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
cl-lib-tests.el New macros incf and decf 2025-02-23 00:38:22 +01:00
cl-macs-tests.el Merge from savannah/emacs-30 2025-04-18 16:30:39 -07:00
cl-preloaded-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
cl-print-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
cl-seq-tests.el Add more tests for cl-seq.el 2025-03-06 00:47:24 +01:00
comp-cstr-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
comp-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
cond-star-tests.el Update copyright year to 2025 2025-01-01 07:39:17 +00:00
copyright-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
derived-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
easy-mmode-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
edebug-tests.el Use cl-with-gensyms in a few more cases 2025-02-25 01:23:33 +01:00
ert-font-lock-tests.el Fix ert-font-lock macro signatures 2025-02-25 11:02:55 +01:00
ert-tests.el Revert "Avoid excessively large backtraces in ert-tests (bug#71988)" 2025-06-20 14:03:40 +00:00
ert-x-tests.el Move buffer related functions from ert-x.el to ert.el 2025-02-24 20:45:41 +01:00
find-func-tests.el ; Fix recently broken test (bug#77777). 2025-04-13 13:55:37 +02:00
float-sup-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
generator-tests.el Prefer incf to cl-incf in tests 2025-02-23 00:38:22 +01:00
gv-tests.el New macros incf and decf 2025-02-23 00:38:22 +01:00
hierarchy-tests.el Prefer incf to cl-incf in tests 2025-02-23 00:38:22 +01:00
icons-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
let-alist-tests.el Prefer incf to cl-incf in tests 2025-02-23 00:38:22 +01:00
lisp-mnt-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
lisp-mode-tests.el Make define-global-minor-mode alias obsolete 2025-02-26 06:37:52 +01:00
lisp-tests.el Gather variable binding tests in data-tests.el 2025-05-30 11:41:19 +01:00
macroexp-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
map-tests.el Prefer incf to cl-incf in tests 2025-02-23 00:38:22 +01:00
memory-report-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
multisession-tests.el Prefer incf to cl-incf in tests 2025-02-23 00:38:22 +01:00
nadvice-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
oclosure-tests.el Prefer incf to cl-incf in tests 2025-02-23 00:38:22 +01:00
package-tests.el Correct (debug body) edebug specs 2025-03-08 18:35:07 +01:00
pcase-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
pp-tests.el (pp-fill): Fix bug#76715 2025-03-05 18:35:35 -05:00
range-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
regexp-opt-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
ring-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
rmc-tests.el Adapt a number of regression tests to Android 2025-02-26 11:33:35 +08:00
rx-tests.el Make the rx eval form use lexical binding when active 2025-02-17 16:24:53 +01:00
seq-tests.el Prefer oddp/evenp to free-coding them in tests 2025-02-17 05:37:10 +01:00
shadow-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
shortdoc-tests.el ; Replace "Elisp" with "Lisp" or "Emacs Lisp" in some places 2025-03-12 10:24:22 +08:00
subr-x-tests.el Clean up text properties in 'visual-wrap-prefix-mode' 2025-06-10 22:09:26 -07:00
syntax-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
tabulated-list-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
testcover-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
text-property-search-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
thunk-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
timer-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
track-changes-tests.el Prefer ert-with-temp-directory in tests 2025-02-23 03:46:57 +01:00
unsafep-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
vtable-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00
warnings-tests.el Update copyright year to 2025 2025-01-02 18:39:42 +01:00