Commit 8e399682 authored by Stefan Monnier's avatar Stefan Monnier

* lisp/emacs-lisp/trace.el (trace--read-args): Provide a default.

parent 33e249a2
2013-05-29 Stefan Monnier <>
* emacs-lisp/trace.el (trace--read-args): Provide a default.
* emacs-lisp/lisp-mode.el (lisp-mode-shared-map): Inherit from
......@@ -262,7 +262,17 @@ be printed along with the arguments in the trace."
(defun trace--read-args (prompt)
(intern (completing-read prompt obarray 'fboundp t))
(let ((default (function-called-at-point))
(beg (string-match ":[ \t]*\\'" prompt)))
(intern (completing-read (if default
"%s (default %s)%s"
(substring prompt 0 beg)
(if beg (substring prompt beg) ": "))
obarray 'fboundp t nil nil
(if default (symbol-name default)))))
(when current-prefix-arg
(read-buffer "Output to buffer: " trace-buffer)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment