Function: backtrace-frames

backtrace-frames is a byte-compiled function defined in subr.el.gz.

Signature

(backtrace-frames &optional BASE)

Documentation

Collect all frames of current backtrace into a list.

If non-nil, BASE should be a function, and frames before its nearest activation frame are discarded.

Source Code

;; Defined in /usr/src/emacs/lisp/subr.el.gz
(defun backtrace-frames (&optional base)
  "Collect all frames of current backtrace into a list.
If non-nil, BASE should be a function, and frames before its
nearest activation frame are discarded."
  (let ((frames nil))
    (mapbacktrace (lambda (&rest frame) (push frame frames))
                  (or base #'backtrace-frames))
    (nreverse frames)))