]> git.eshelyaron.com Git - emacs.git/commit
trace.el: Make it usable in batch mode as well
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 19 Jan 2024 20:02:50 +0000 (15:02 -0500)
committerEshel Yaron <me@eshelyaron.com>
Sat, 20 Jan 2024 09:07:20 +0000 (10:07 +0100)
commit3bc89e2eb248567f3a4de8dc8e517c6efa21191d
treeff1767ec14313ad286b04478fd3aea5518be5d67
parentc4b570f48921929974c3bbc79660127e68ac8bf0
trace.el: Make it usable in batch mode as well

While at it, this fixes a bug where a traced function was not
able to set `deactivate-mark`.

* lisp/emacs-lisp/trace.el (trace--insert): New function, extracted
from `trace-make-advice`.  Output to stdout in batch mode.
(trace--entry-message): Rename from `trace-entry-message`.
Change calling convention.  Do the insertion directly from here.
(trace--exit-message): Rename from `trace-exit-message`.
Change calling convention.  Do the insertion directly from here.
(trace-make-advice, trace-values): Simplify accordingly.

(cherry picked from commit 1293aac0df4e2837a141818f225539ec847b6684)
lisp/emacs-lisp/trace.el