From: Stefan Monnier Date: Sun, 14 Apr 2013 01:02:29 +0000 (-0400) Subject: * lisp/emacs-lisp/trace.el (trace-values): New function. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2026^2~474 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=830aed4d5e06af8644db9514f1dd4f59e1026499;p=emacs.git * lisp/emacs-lisp/trace.el (trace-values): New function. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d111d40dab2..3d92d79fd0a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2013-04-14 Stefan Monnier + * emacs-lisp/trace.el (trace-values): New function. + * files.el: Allow : in local variables (bug#14089). (hack-local-variable-regexp): New var. (hack-local-variables-prop-line, hack-local-variables): Use it. 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,