emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 9aa9d79 07/19: Add links in backtraces to functions


From: Gemini Lasswell
Subject: [Emacs-diffs] master 9aa9d79 07/19: Add links in backtraces to functions written in C (bug#25393)
Date: Fri, 3 Aug 2018 13:32:55 -0400 (EDT)

branch: master
commit 9aa9d79e4420f367242312aedd61594fd173dec6
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 | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/backtrace.el b/lisp/emacs-lisp/backtrace.el
index d6c04bb..bec57f2 100644
--- a/lisp/emacs-lisp/backtrace.el
+++ b/lisp/emacs-lisp/backtrace.el
@@ -651,7 +651,11 @@ Format it according to VIEW."
          (evald (backtrace-frame-evald frame))
          (fun   (backtrace-frame-fun frame))
          (args  (backtrace-frame-args frame))
-         (fun-file (symbol-file fun 'defun))
+         (def   (and (symbolp fun) (fboundp fun) (symbol-function fun)))
+         (fun-file (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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]