diff options
author | Gemini Lasswell <gazally@runbox.com> | 2018-06-25 13:23:03 -0700 |
---|---|---|
committer | Gemini Lasswell <gazally@runbox.com> | 2018-08-03 08:53:02 -0700 |
commit | 9aa9d79e4420f367242312aedd61594fd173dec6 (patch) | |
tree | 12b8c1e81574ead6cdf4d3a2e64a6b3b56e08669 /lisp/emacs-lisp | |
parent | bb9de872e86372c8a2475503e6be6b6bd64e06d6 (diff) | |
download | emacs-9aa9d79e4420f367242312aedd61594fd173dec6.tar.gz emacs-9aa9d79e4420f367242312aedd61594fd173dec6.tar.bz2 emacs-9aa9d79e4420f367242312aedd61594fd173dec6.zip |
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.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/backtrace.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/backtrace.el b/lisp/emacs-lisp/backtrace.el index d6c04bb4c67..bec57f29245 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)) |