summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/trace.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp/trace.el')
-rw-r--r--lisp/emacs-lisp/trace.el17
1 files changed, 5 insertions, 12 deletions
diff --git a/lisp/emacs-lisp/trace.el b/lisp/emacs-lisp/trace.el
index 4ebb7ff711d..627305689c7 100644
--- a/lisp/emacs-lisp/trace.el
+++ b/lisp/emacs-lisp/trace.el
@@ -265,20 +265,13 @@ be printed along with the arguments in the trace."
If `current-prefix-arg' is non-nil, also read a buffer and a \"context\"
\(Lisp expression). Return (FUNCTION BUFFER FUNCTION-CONTEXT)."
(cons
- (let ((default (function-called-at-point))
- (beg (string-match ":[ \t]*\\'" prompt)))
- (intern (completing-read (if default
- (format
- "%s (default %s)%s"
- (substring prompt 0 beg)
- default
- (if beg (substring prompt beg) ": "))
- prompt)
+ (let ((default (function-called-at-point)))
+ (intern (completing-read (format-prompt prompt default)
obarray 'fboundp t nil nil
(if default (symbol-name default)))))
(when current-prefix-arg
(list
- (read-buffer "Output to buffer: " trace-buffer)
+ (read-buffer (format-prompt "Output to buffer" trace-buffer))
(let ((exp
(let ((minibuffer-completing-symbol t))
(read-from-minibuffer "Context expression: "
@@ -308,7 +301,7 @@ functions that switch buffers, or do any other display-oriented
stuff - use `trace-function-background' instead.
To stop tracing a function, use `untrace-function' or `untrace-all'."
- (interactive (trace--read-args "Trace function: "))
+ (interactive (trace--read-args "Trace function"))
(trace-function-internal function buffer nil context))
;;;###autoload
@@ -316,7 +309,7 @@ To stop tracing a function, use `untrace-function' or `untrace-all'."
"Trace calls to function FUNCTION, quietly.
This is like `trace-function-foreground', but without popping up
the output buffer or changing the window configuration."
- (interactive (trace--read-args "Trace function in background: "))
+ (interactive (trace--read-args "Trace function in background"))
(trace-function-internal function buffer t context))
;;;###autoload