summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/trace.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2013-04-13 21:02:29 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2013-04-13 21:02:29 -0400
commit830aed4d5e06af8644db9514f1dd4f59e1026499 (patch)
treeaa83540d57b7cce08880016eb87811ce3a958a6c /lisp/emacs-lisp/trace.el
parenta829b0dc898972de4b24b1a9a807f529ddd7b818 (diff)
downloademacs-830aed4d5e06af8644db9514f1dd4f59e1026499.tar.gz
* lisp/emacs-lisp/trace.el (trace-values): New function.
Diffstat (limited to 'lisp/emacs-lisp/trace.el')
-rw-r--r--lisp/emacs-lisp/trace.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/trace.el b/lisp/emacs-lisp/trace.el
index 09c4969cf18..fce8643923f 100644
--- a/lisp/emacs-lisp/trace.el
+++ b/lisp/emacs-lisp/trace.el
@@ -157,6 +157,17 @@
(defvar inhibit-trace nil
"If non-nil, all tracing is temporarily inhibited.")
+;;;###autoload
+(defun trace-values (&rest values)
+ "Helper function to get internal values.
+You can call this function to add internal values in the trace buffer."
+ (unless inhibit-trace
+ (with-current-buffer trace-buffer
+ (goto-char (point-max))
+ (insert
+ (trace-entry-message
+ 'trace-values trace-level values "")))))
+
(defun trace-entry-message (function level args context)
"Generate a string that describes that FUNCTION has been entered.
LEVEL is the trace level, ARGS is the list of arguments passed to FUNCTION,