[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] scratch/backtrace-mode 2ed27cf 07/11: Add links in backtra
From: |
Gemini Lasswell |
Subject: |
[Emacs-diffs] scratch/backtrace-mode 2ed27cf 07/11: Add links in backtraces to functions written in C (bug#25393) |
Date: |
Sun, 15 Jul 2018 15:06:18 -0400 (EDT) |
branch: scratch/backtrace-mode
commit 2ed27cf5fe07b1897daded75a30bd6d82563b939
Author: Gemini Lasswell <address@hidden>
Commit: Gemini Lasswell <address@hidden>
Add links in backtraces to functions written in C (bug#25393)
* lisp/emacs-lisp/backtrace.el (backtrace--print-func-and-args):
Look up file names for built-in functions with evaluated arguments.
---
lisp/emacs-lisp/backtrace.el | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/lisp/emacs-lisp/backtrace.el b/lisp/emacs-lisp/backtrace.el
index b113882..f47c7c5 100644
--- a/lisp/emacs-lisp/backtrace.el
+++ b/lisp/emacs-lisp/backtrace.el
@@ -691,7 +691,12 @@ Format it according to VIEW."
(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)))
+ (def (and (symbolp fun) (fboundp fun) (symbol-function fun)))
+ (fun-file (and (plist-get view :do-xrefs)
+ (or (symbol-file fun 'defun)
+ (and (subrp def)
+ (not (eq 'unevalled (cdr (subr-arity def))))
+ (find-lisp-object-file-name fun def)))))
(fun-pt (point)))
(cond
((and evald (not debugger-stack-frame-as-list))
@@ -717,7 +722,7 @@ Format it according to VIEW."
(when fun-file
(make-text-button fun-pt (+ fun-pt (length (symbol-name fun)))
:type 'help-function-def
- 'help-args (list fun fun-file)))
+ 'help-args (list fun fun-file nil)))
;; After any frame that uses eval-buffer, insert a comment that
;; states the buffer position it's reading at.
(when (backtrace-frame-pos frame)
- [Emacs-diffs] branch scratch/backtrace-mode created (now fb3578b), Gemini Lasswell, 2018/07/15
- [Emacs-diffs] scratch/backtrace-mode db5f876 08/11: Add link in backtraces to position in buffer being evaluated (bug#14081), Gemini Lasswell, 2018/07/15
- [Emacs-diffs] scratch/backtrace-mode 2ed27cf 07/11: Add links in backtraces to functions written in C (bug#25393),
Gemini Lasswell <=
- [Emacs-diffs] scratch/backtrace-mode 86f69ed 04/11: Initialize backtrace display options in backtrace-mode, Gemini Lasswell, 2018/07/15
- [Emacs-diffs] scratch/backtrace-mode 2e73307 10/11: Change keybinding for backtrace-collapse from '=' to '-', Gemini Lasswell, 2018/07/15
- [Emacs-diffs] scratch/backtrace-mode 923d3a6 06/11: Add prefix argument to backtrace-toggle-print-circle, Gemini Lasswell, 2018/07/15
- [Emacs-diffs] scratch/backtrace-mode 2276cc2 05/11: Lazily print backtrace frame local variables, Gemini Lasswell, 2018/07/15
- [Emacs-diffs] scratch/backtrace-mode 3c4f9e9 02/11: Add methods for strings to cl-print, Gemini Lasswell, 2018/07/15
- [Emacs-diffs] scratch/backtrace-mode 8d270bd 01/11: Support ellipsis expansion in cl-print, Gemini Lasswell, 2018/07/15
- [Emacs-diffs] scratch/backtrace-mode fb3578b 11/11: Add new command to expand all "..."s in a backtrace frame, Gemini Lasswell, 2018/07/15
- [Emacs-diffs] scratch/backtrace-mode 425cb61 09/11: Add more tests for backtrace-mode, Gemini Lasswell, 2018/07/15
- [Emacs-diffs] scratch/backtrace-mode 6c62b9e 03/11: Add backtrace-mode and use it in the debugger, ERT and Edebug, Gemini Lasswell, 2018/07/15