(eval-when-compile (require 'cl-lib))
(eval-when-compile (require 'pcase))
(eval-when-compile (require 'subr-x)) ; if-let
+(require 'find-func)
(require 'help-mode) ; Define `help-function-def' button type.
(require 'lisp-mode)
(evald (backtrace-frame-evald frame))
(fun (backtrace-frame-fun frame))
(args (backtrace-frame-args frame))
- (def (and (symbolp fun) (fboundp fun) (symbol-function fun)))
+ (def (find-function-advised-original 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))))
+ (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))
(insert (backtrace--print-to-string fun-and-args)))
(cl-incf fun-pt)))
(when fun-file
- (make-text-button fun-pt (+ fun-pt (length (symbol-name fun)))
+ (make-text-button fun-pt (+ fun-pt
+ (length (backtrace--print-to-string fun)))
:type 'help-function-def
'help-args (list fun fun-file)))
;; After any frame that uses eval-buffer, insert a comment that