emacs/lisp/emacs-lisp
Alan Mackenzie 2114a955c2 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 (sub-macroexp--posify-form)
(macroexp--posify-form): New functions.
(macroexp-preserve-posification): New macro.
(macroexp-macroexpand): Use the new macro to preserve a calling
form's position.
(macroexpand-all): Add a new parameter `keep-pos' which
instructs the function to preserve an invoking form's position.

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

* lisp/emacs-lisp/bytecomp.el (byte-compile-preprocess): Call
macroexpand-all with the new argument `keep-pos' non-nil.
2024-10-20 14:04:26 +00:00
..
advice.el ad-activate-advised-definition: Use proper function objects 2024-05-30 18:57:56 -04:00
avl-tree.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
backquote.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
backtrace.el (backtrace--print-func-and-args): Fix (part of) bug#70436 2024-04-20 11:23:58 -04:00
benchmark.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
bindat.el * lisp/emacs-lisp/bindat.el (sint): Burp in dynbind (bug#69749) 2024-03-15 12:45:09 -04:00
byte-opt.el Preserve source position of macro calls in macro expansions 2024-10-20 14:04:26 +00:00
byte-run.el Add some basic checking for function type declarations 2024-07-24 19:20:11 +02:00
bytecomp.el Preserve source position of macro calls in macro expansions 2024-10-20 14:04:26 +00:00
cconv.el Use a dedicated type to represent interpreted-function values 2024-04-28 11:58:12 -04:00
chart.el Merge from origin/emacs-30 2024-10-12 05:53:27 -04:00
check-declare.el Do not attempt to check declarations in lock files 2024-02-20 22:49:07 +01:00
checkdoc.el Merge from origin/emacs-30 2024-08-24 06:04:51 -04:00
cl-extra.el Use Emacs Lisp xref backend in Lisp Help buffers 2024-10-03 03:05:18 +03:00
cl-generic.el Improve navigation to cl-defgeneric uses 2024-05-26 05:56:14 +03:00
cl-indent.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cl-lib.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
cl-macs.el ; * lisp/emacs-lisp/cl-macs.el (cl-once-only): Fix capitalisation. 2024-10-06 13:38:57 +08:00
cl-preloaded.el Rename subr-native-elisp to native-comp-function (bug#71123) 2024-05-28 20:52:40 -04:00
cl-print.el Use a dedicated type to represent interpreted-function values 2024-04-28 11:58:12 -04:00
cl-seq.el Safer and faster string sorting 2024-05-12 14:58:38 +02:00
comp-common.el Add 'message' to 'comp-primitive-type-specifiers' 2024-06-03 17:55:16 +02:00
comp-cstr.el * lisp/emacs-lisp/comp-cstr.el (comp-cstr-type-p): Add assertion. 2024-10-15 22:13:08 +02:00
comp-run.el Prefer defvar-local where possible 2024-10-01 21:31:02 +02:00
comp.el * lisp/emacs-lisp/comp.el (comp--type-check-optim-block): Improve log msg. 2024-10-15 22:13:08 +02:00
compat.el ; * lisp/emacs-lisp/compat.el: Fix header style. 2024-08-18 11:47:38 +02:00
cond-star.el ; * lisp/emacs-lisp/cond-star.el (cond*): Fix typo. 2024-10-01 09:15:44 +08:00
copyright.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
crm.el Support minibuffer-visible-completions in completing-read-multiple 2024-08-07 19:52:36 +03:00
cursor-sensor.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
debug-early.el (backtrace-on-redisplay-error): Use handler-bind 2024-01-04 16:37:01 -05:00
debug.el debug.el: Prevent re-entering the debugger for the same error 2024-03-16 23:10:48 -04:00
derived.el derived.el: Delete old code (bug#68625) 2024-01-29 19:04:59 -05:00
disass.el Redirect calls to subr-native-elisp-p to native-comp-function-p 2024-05-28 20:53:25 -04:00
easy-mmode.el ; * lisp/emacs-lisp/easy-mmode.el (easy-mmode--prev): Doc fix. 2024-09-27 08:49:46 +03:00
easymenu.el ; Improve documentation of 'easy-menu-define' 2024-09-14 11:55:08 +03:00
edebug.el (edebug--called-interactively-skip): Fix bug#71934 2024-07-04 11:47:01 -04:00
eieio-base.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
eieio-core.el (cl-type-of): New function to return more precise types (bug#69739) 2024-03-18 09:29:47 -04:00
eieio-custom.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
eieio-datadebug.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
eieio-opt.el ; Simplify (with-current-buffer (get-buffer ...) ...) 2024-03-14 12:40:26 +02:00
eieio-speedbar.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
eieio.el eieio-core.el: Always put a parent in the parents of a class 2024-03-08 02:04:59 -05:00
eldoc.el Checkdoc fixes in emacs-lisp/*.el 2024-07-08 14:30:37 +02:00
elint.el Take file-local variables into account in elint-file (bug#69076) 2024-02-14 08:54:04 +01:00
elp.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
ert-font-lock.el Require ert-x for use by 'ert-font-lock-deftest-file' 2024-09-28 14:10:00 +03:00
ert-x.el Complete change of ert-remote-temporary-file-directory 2024-01-06 18:15:23 +01:00
ert.el (pp): Indent lines right when starting in col > 0 2024-08-26 11:49:37 -04:00
ewoc.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
faceup.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
find-func.el find-function-mode: Define keys at a low precedence level 2024-10-04 20:46:00 +08:00
float-sup.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
generate-lisp-file.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
generator.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
generic.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
gv.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
helper.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
hierarchy.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
icons.el * lisp/emacs-lisp/icons.el (define-icon): Add 'doc-string' to 'declare'. 2024-04-17 21:01:14 +03:00
inline.el * lisp/emacs-lisp/inline.el (inline-const-val): Improve docstring 2024-01-30 13:14:32 -05:00
let-alist.el Support numeric indexing in let-alist 2024-09-19 03:54:59 +02:00
lisp-mnt.el Merge from savannah/emacs-30 2024-07-07 10:23:08 +08:00
lisp-mode.el Use a dedicated type to represent interpreted-function values 2024-04-28 11:58:12 -04:00
lisp.el Prefer defcustom :local specifier 2024-10-04 01:38:11 +02:00
loaddefs-gen.el Address compilation errors and warnings on x86 Solaris 10 systems 2024-05-26 11:50:45 +08:00
macroexp.el Preserve source position of macro calls in macro expansions 2024-10-20 14:04:26 +00:00
map-ynp.el Correct earlier change to map-ynp 2024-05-08 20:26:08 +08:00
map.el * lisp/emacs-lisp/map.el (map--make-pcase-bindings): Fix use in Emacs<30 2024-02-21 08:49:15 -05:00
memory-report.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
multisession.el Fix multisession.el when SQLite becomes unavailable 2024-09-07 10:42:01 +03:00
nadvice.el Use a dedicated type to represent interpreted-function values 2024-04-28 11:58:12 -04:00
oclosure.el Use a dedicated type to represent interpreted-function values 2024-04-28 11:58:12 -04:00
package-vc.el Insert correct commit data into VC package descriptions 2024-09-21 17:44:26 +02:00
package-x.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
package.el * lisp/emacs-lisp/package.el (package-isolate): Use package-activate-all 2024-10-01 14:46:06 -04:00
pcase.el * lisp/emacs-lisp/pcase.el (pcase--expand-\`): Improve warning message 2024-09-26 16:40:54 -04:00
pp.el (pp): Indent lines right when starting in col > 0 2024-08-26 11:49:37 -04:00
radix-tree.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
range.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
re-builder.el ; Simplify (with-current-buffer (get-buffer ...) ...) 2024-03-14 12:40:26 +02:00
regexp-opt.el Change 'type' declaration to 'ftype' 2024-05-14 11:17:25 +02:00
regi.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
ring.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
rmc.el ; Fix typos in symbols 2024-06-29 17:29:38 +02:00
rx.el Remove misspelled rx category chinse-two-byte 2024-08-01 10:42:24 +02:00
seq.el ; * admin/MAINTAINERS: Remove Nicolas Petton. 2024-07-25 16:15:52 +02:00
shadow.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
shortdoc.el ; * lisp/vc/vc-git.el (vc-git--out-str): Doc fix. 2024-03-18 15:59:54 +02:00
shorthands.el Improve shorthands-font-lock-shorthands (bug#67390) 2024-02-03 08:40:03 -06:00
smie.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
subr-x.el work-buffer--release: Bind inhibit-read-only 2024-10-05 09:15:46 +08:00
syntax.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
tabulated-list.el * lisp/buff-menu.el (Buffer-menu-group-sort-by): New defcustom. 2024-06-07 19:57:07 +03:00
tcover-ses.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
testcover.el Declare nested backquotes unsupported in Pcase patterns (bug#72328) 2024-09-24 14:01:26 -04:00
text-property-search.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
thunk.el ; * admin/MAINTAINERS: Remove Nicolas Petton. 2024-07-25 16:15:52 +02:00
timer-list.el Use timer accessors instead of aref/aset 2024-07-25 14:40:35 +02:00
timer.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
tq.el ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
trace.el Merge from origin/emacs-29 2024-02-10 05:07:56 -05:00
track-changes.el Merge from origin/emacs-30 2024-10-18 17:56:15 +02:00
unsafep.el Merge from savannah/emacs-29 2024-01-02 10:28:14 +08:00
vtable.el Fix alignment and documentation of vtable.el 2024-09-07 11:27:03 +03:00
warnings.el * lisp/emacs-lisp/warnings.el (display-warning): Add guardrails for window. 2024-05-06 20:00:23 +03:00