Function: trace--read-args
trace--read-args is a byte-compiled function defined in trace.el.gz.
Signature
(trace--read-args PROMPT)
Documentation
Read a function name, prompting with string PROMPT.
If current-prefix-arg is non-nil, also read a buffer and a "context"
(Lisp expression). Return (FUNCTION BUFFER FUNCTION-CONTEXT).
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/trace.el.gz
(defun trace--read-args (prompt)
"Read a function name, prompting with string PROMPT.
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)))
(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)
(let ((exp
(read-from-minibuffer "Context expression: "
nil read-expression-map t
'read-expression-history)))
(lambda ()
(let ((print-circle t)
(print-escape-newlines t))
(concat " [" (prin1-to-string (eval exp t)) "]"))))))))