diff options
| author | Stefan Monnier | 2013-04-13 21:02:29 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2013-04-13 21:02:29 -0400 |
| commit | 830aed4d5e06af8644db9514f1dd4f59e1026499 (patch) | |
| tree | aa83540d57b7cce08880016eb87811ce3a958a6c | |
| parent | a829b0dc898972de4b24b1a9a807f529ddd7b818 (diff) | |
| download | emacs-830aed4d5e06af8644db9514f1dd4f59e1026499.tar.gz emacs-830aed4d5e06af8644db9514f1dd4f59e1026499.zip | |
* lisp/emacs-lisp/trace.el (trace-values): New function.
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/trace.el | 11 |
2 files changed, 13 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d111d40dab2..3d92d79fd0a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | 2013-04-14 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2013-04-14 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * emacs-lisp/trace.el (trace-values): New function. | ||
| 4 | |||
| 3 | * files.el: Allow : in local variables (bug#14089). | 5 | * files.el: Allow : in local variables (bug#14089). |
| 4 | (hack-local-variable-regexp): New var. | 6 | (hack-local-variable-regexp): New var. |
| 5 | (hack-local-variables-prop-line, hack-local-variables): Use it. | 7 | (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 @@ | |||
| 157 | (defvar inhibit-trace nil | 157 | (defvar inhibit-trace nil |
| 158 | "If non-nil, all tracing is temporarily inhibited.") | 158 | "If non-nil, all tracing is temporarily inhibited.") |
| 159 | 159 | ||
| 160 | ;;;###autoload | ||
| 161 | (defun trace-values (&rest values) | ||
| 162 | "Helper function to get internal values. | ||
| 163 | You can call this function to add internal values in the trace buffer." | ||
| 164 | (unless inhibit-trace | ||
| 165 | (with-current-buffer trace-buffer | ||
| 166 | (goto-char (point-max)) | ||
| 167 | (insert | ||
| 168 | (trace-entry-message | ||
| 169 | 'trace-values trace-level values ""))))) | ||
| 170 | |||
| 160 | (defun trace-entry-message (function level args context) | 171 | (defun trace-entry-message (function level args context) |
| 161 | "Generate a string that describes that FUNCTION has been entered. | 172 | "Generate a string that describes that FUNCTION has been entered. |
| 162 | LEVEL is the trace level, ARGS is the list of arguments passed to FUNCTION, | 173 | LEVEL is the trace level, ARGS is the list of arguments passed to FUNCTION, |