diff options
| author | Gemini Lasswell <gazally@runbox.com> | 2018-06-24 07:17:47 -0700 |
|---|---|---|
| committer | Gemini Lasswell <gazally@runbox.com> | 2018-08-03 08:53:02 -0700 |
| commit | 5b50fa5a9d4f7c032a845bc0152c11b70ee1bf53 (patch) | |
| tree | 91b2ef8353600ce4465d40dbee6fb6348db9800f /lisp/emacs-lisp/backtrace.el | |
| parent | e09120d68694272ea5efbe13b16936b4382389d8 (diff) | |
| download | emacs-5b50fa5a9d4f7c032a845bc0152c11b70ee1bf53.tar.gz | |
Always make buttons from function names in backtraces
* lisp/emacs-lisp/backtrace.el (backtrace-view)
(backtrace--print-func-and-args, backtrace-mode): Always
make buttons. Remove all uses of ':do-xrefs'.
* lisp/emacs-lisp/debug.el (debugger-setup-buffer): Modify
backtrace-view instead of setting it.
* lisp/emacs-lisp/edebug.el (edebug-backtrace):
* lisp/emacs-lisp/ert.el
(ert-results-pop-to-backtrace-for-test-at-point):
Remove initialization of backtrace-view.
Diffstat (limited to 'lisp/emacs-lisp/backtrace.el')
| -rw-r--r-- | lisp/emacs-lisp/backtrace.el | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/backtrace.el b/lisp/emacs-lisp/backtrace.el index d16edb6a6cf..bcff14705c7 100644 --- a/lisp/emacs-lisp/backtrace.el +++ b/lisp/emacs-lisp/backtrace.el @@ -146,7 +146,7 @@ This should be a list of `backtrace-frame' objects.") (defvar-local backtrace-view nil "A plist describing how to render backtrace frames. -Possible entries are :show-flags, :do-xrefs and :print-circle.") +Possible entries are :show-flags and :print-circle.") (defvar-local backtrace-insert-header-function nil "Function for inserting a header for the current Backtrace buffer. @@ -591,14 +591,14 @@ property for use by navigation." (insert (if (and (plist-get view :show-flags) flag) "* " " ")) (put-text-property beg (point) 'backtrace-section 'func))) -(defun backtrace--print-func-and-args (frame view) +(defun backtrace--print-func-and-args (frame _view) "Print the function, arguments and buffer position of a backtrace FRAME. Format it according to VIEW." (let* ((beg (point)) (evald (backtrace-frame-evald frame)) (fun (backtrace-frame-fun frame)) (args (backtrace-frame-args frame)) - (fun-file (and (plist-get view :do-xrefs) (symbol-file fun 'defun))) + (fun-file (symbol-file fun 'defun)) (fun-pt (point))) (cond ((and evald (not debugger-stack-frame-as-list)) @@ -707,15 +707,16 @@ creates a backtrace-mode buffer, should usually do the following: - Maybe set `backtrace-insert-header-function' to a function to create header text for the buffer. - Set `backtrace-frames' (see below). - - Set `backtrace-view' if desired (see below). + - Maybe modify `backtrace-view' (see below). - Maybe set `backtrace-print-function'. A command which creates or switches to a Backtrace mode buffer, such as `ert-results-pop-to-backtrace-for-test-at-point', should initialize `backtrace-frames' to a list of `backtrace-frame' objects (`backtrace-get-frames' is provided for that purpose, if -desired), and `backtrace-view' to a plist describing how it wants -the backtrace to appear. Finally, it should call `backtrace-print'. +desired), and may optionally modify `backtrace-view', which is a +plist describing the appearance of the backtrace. Finally, it +should call `backtrace-print'. `backtrace-print' calls `backtrace-insert-header-function' followed by `backtrace-print-frame', once for each stack frame." |
