1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

* lisp/emacs-lisp/trace.el (trace-values): Work outside of traced function

This commit is contained in:
Stefan Monnier 2021-03-02 09:13:57 -05:00
parent 6dee194535
commit 20596a5ca2

View file

@ -161,7 +161,7 @@
"Helper function to get internal values. "Helper function to get internal values.
You can call this function to add internal values in the trace buffer." You can call this function to add internal values in the trace buffer."
(unless inhibit-trace (unless inhibit-trace
(with-current-buffer trace-buffer (with-current-buffer (get-buffer-create trace-buffer)
(goto-char (point-max)) (goto-char (point-max))
(insert (insert
(trace-entry-message (trace-entry-message
@ -174,7 +174,7 @@ and CONTEXT is a string describing the dynamic context (e.g. values of
some global variables)." some global variables)."
(let ((print-circle t)) (let ((print-circle t))
(format "%s%s%d -> %S%s\n" (format "%s%s%d -> %S%s\n"
(mapconcat 'char-to-string (make-string (1- level) ?|) " ") (mapconcat 'char-to-string (make-string (max 0 (1- level)) ?|) " ")
(if (> level 1) " " "") (if (> level 1) " " "")
level level
;; FIXME: Make it so we can click the function name to jump to its ;; FIXME: Make it so we can click the function name to jump to its