aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZach Shaftel2020-07-15 12:20:20 -0400
committerrocky2020-07-15 13:13:59 -0400
commit717ac6ccd15115b8ec497bdd70bd1ad6d1be2d47 (patch)
tree4fecee718a818901d41c91d8b52a7408bb3e4ce8
parent0cb1df1edd86986d5d7a3ecf607fe78af03d62a0 (diff)
downloademacs-feature/soc-bytecode-in-traceback.tar.gz
emacs-feature/soc-bytecode-in-traceback.zip
Only print offset for byte-code functionsfeature/soc-bytecode-in-traceback
* lisp/emacs-lisp/backtrace.el (backtrace--print-flags): Check if the function is compiled and only print the offset in that case.
-rw-r--r--lisp/emacs-lisp/backtrace.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/backtrace.el b/lisp/emacs-lisp/backtrace.el
index c3f2ff0cfec..f67e1dd72ac 100644
--- a/lisp/emacs-lisp/backtrace.el
+++ b/lisp/emacs-lisp/backtrace.el
@@ -749,11 +749,13 @@ property for use by navigation."
749 (source (plist-get (backtrace-frame-flags frame) :source-available)) 749 (source (plist-get (backtrace-frame-flags frame) :source-available))
750 (offset (plist-get (backtrace-frame-flags frame) :bytecode-offset)) 750 (offset (plist-get (backtrace-frame-flags frame) :bytecode-offset))
751 ;; right justify and pad the offset (or the empty string) 751 ;; right justify and pad the offset (or the empty string)
752 (offset-format (format "%%%ds " (- backtrace--flags-width 3)))) 752 (offset-format (format "%%%ds " (- backtrace--flags-width 3)))
753 (fun (ignore-errors (indirect-function (backtrace-frame-fun frame)))))
753 (when (plist-get view :show-flags) 754 (when (plist-get view :show-flags)
754 (insert (if source ">" " ")) 755 (insert (if source ">" " "))
755 (insert (if flag "*" " ")) 756 (insert (if flag "*" " "))
756 (insert (format offset-format (or offset "")))) 757 (insert (format offset-format
758 (or (and (byte-code-function-p fun) offset) ""))))
757 (put-text-property beg (point) 'backtrace-section 'func))) 759 (put-text-property beg (point) 'backtrace-section 'func)))
758 760
759(defun backtrace--print-func-and-args (frame _view) 761(defun backtrace--print-func-and-args (frame _view)