summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/trace.el
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-01-16 11:48:32 -0700
committerTom Tromey <tromey@redhat.com>2013-01-16 11:48:32 -0700
commit6f4de085f065e11f4df3195d47479f28f5ef08ba (patch)
tree1211a00f1afc86c2b73624897993db02a4852943 /lisp/emacs-lisp/trace.el
parente078a23febca14bc919c5806670479c395e3253e (diff)
parentffe04adc88e546c406f9b050238fb98a7243c7a0 (diff)
downloademacs-6f4de085f065e11f4df3195d47479f28f5ef08ba.tar.gz
emacs-6f4de085f065e11f4df3195d47479f28f5ef08ba.tar.bz2
emacs-6f4de085f065e11f4df3195d47479f28f5ef08ba.zip
merge from trunk
Diffstat (limited to 'lisp/emacs-lisp/trace.el')
-rw-r--r--lisp/emacs-lisp/trace.el32
1 files changed, 7 insertions, 25 deletions
diff --git a/lisp/emacs-lisp/trace.el b/lisp/emacs-lisp/trace.el
index d2566b8cb9f..fb1b995be2b 100644
--- a/lisp/emacs-lisp/trace.el
+++ b/lisp/emacs-lisp/trace.el
@@ -38,11 +38,6 @@
;; generation of trace output won't interfere with what you are currently
;; doing.
-;; Requirement:
-;; ============
-;; trace.el needs advice.el version 2.0 or later which you can get from the
-;; same place from where you got trace.el.
-
;; Restrictions:
;; =============
;; - Traced subrs when called interactively will always show nil as the
@@ -55,17 +50,6 @@
;; + Macros that were expanded during compilation
;; - All the restrictions that apply to advice.el
-;; Installation:
-;; =============
-;; Put this file together with advice.el (version 2.0 or later) somewhere
-;; into your Emacs `load-path', byte-compile it/them for efficiency, and
-;; put the following autoload declarations into your .emacs
-;;
-;; (autoload 'trace-function "trace" "Trace a function" t)
-;; (autoload 'trace-function-background "trace" "Trace a function" t)
-;;
-;; or explicitly load it with (require 'trace) or (load "trace").
-
;; Usage:
;; ======
;; - To trace a function say `M-x trace-function' which will ask you for the
@@ -183,6 +167,8 @@ some global variables)."
(mapconcat 'char-to-string (make-string (1- level) ?|) " ")
(if (> level 1) " " "")
level
+ ;; FIXME: Make it so we can click the function name to jump to its
+ ;; definition and/or untrace it.
(cons function args)
context)))
@@ -282,21 +268,17 @@ and return values will be inserted into BUFFER. This function generates the
trace advice for FUNCTION and activates it together with any other advice
there might be!! The trace BUFFER will popup whenever FUNCTION is called.
Do not use this to trace functions that switch buffers or do any other
-display oriented stuff, use `trace-function-background' instead."
+display oriented stuff, use `trace-function-background' instead.
+
+To untrace a function, use `untrace-function' or `untrace-all'."
(interactive (trace--read-args "Trace function: "))
(trace-function-internal function buffer nil context))
;;;###autoload
(defun trace-function-background (function &optional buffer context)
"Traces FUNCTION with trace output going quietly to BUFFER.
-When this tracing is enabled, every call to FUNCTION writes
-a Lisp-style trace message (showing the arguments and return value)
-into BUFFER. This function generates advice to trace FUNCTION
-and activates it together with any other advice there might be.
-The trace output goes to BUFFER quietly, without changing
-the window or buffer configuration.
-
-BUFFER defaults to `trace-buffer'."
+Like `trace-function-foreground' but without popping up the trace BUFFER or
+changing the window configuration."
(interactive (trace--read-args "Trace function in background: "))
(trace-function-internal function buffer t context))