[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/soc-bytecode-in-traceback 717ac6c: Only print offset for byte-co
From: |
Rocky Bernstein |
Subject: |
feature/soc-bytecode-in-traceback 717ac6c: Only print offset for byte-code functions |
Date: |
Wed, 15 Jul 2020 13:14:52 -0400 (EDT) |
branch: feature/soc-bytecode-in-traceback
commit 717ac6ccd15115b8ec497bdd70bd1ad6d1be2d47
Author: Zach Shaftel <zshaftel@gmail.com>
Commit: rocky <rocky@gnu.org>
Only print offset for byte-code functions
* lisp/emacs-lisp/backtrace.el (backtrace--print-flags): Check if the
function is compiled and only print the offset in that case.
---
lisp/emacs-lisp/backtrace.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lisp/emacs-lisp/backtrace.el b/lisp/emacs-lisp/backtrace.el
index c3f2ff0..f67e1dd 100644
--- a/lisp/emacs-lisp/backtrace.el
+++ b/lisp/emacs-lisp/backtrace.el
@@ -749,11 +749,13 @@ property for use by navigation."
(source (plist-get (backtrace-frame-flags frame) :source-available))
(offset (plist-get (backtrace-frame-flags frame) :bytecode-offset))
;; right justify and pad the offset (or the empty string)
- (offset-format (format "%%%ds " (- backtrace--flags-width 3))))
+ (offset-format (format "%%%ds " (- backtrace--flags-width 3)))
+ (fun (ignore-errors (indirect-function (backtrace-frame-fun frame)))))
(when (plist-get view :show-flags)
(insert (if source ">" " "))
(insert (if flag "*" " "))
- (insert (format offset-format (or offset ""))))
+ (insert (format offset-format
+ (or (and (byte-code-function-p fun) offset) ""))))
(put-text-property beg (point) 'backtrace-section 'func)))
(defun backtrace--print-func-and-args (frame _view)