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 <monnier@iro.umontreal.ca>
* emacs-lisp/trace.el (trace--read-args): Provide a default.
* emacs-lisp/lisp-mode.el (lisp-mode-shared-map): Inherit from
prog-mode-map.
......
......@@ -262,7 +262,17 @@ be printed along with the arguments in the trace."
(defun trace--read-args (prompt)
(cons
(intern (completing-read prompt obarray 'fboundp t))
(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)
obarray 'fboundp t nil nil
(if default (symbol-name default)))))
(when current-prefix-arg
(list
(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