Function: backtrace-get-index

backtrace-get-index is a byte-compiled function defined in backtrace.el.gz.

Signature

(backtrace-get-index &optional POS)

Documentation

Return the index of the backtrace frame at POS.

The value is an index into backtrace-frames(var)/backtrace-frames(fun), or nil. POS, if omitted or nil, defaults to point.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/backtrace.el.gz
;;; Navigation and Text Properties

;; This mode uses the following text properties:
;; backtrace-index: The index into the buffer-local variable
;;   `backtrace-frames' for the frame at point, or nil if outside of a
;;   frame (in the buffer header).
;; backtrace-view: A plist describing how the frame is printed.  See
;;   the docstring for the buffer-local variable `backtrace-view.
;; backtrace-section: The part of a frame which point is in.  Either
;;   `func' or `locals'.  At the moment just used to show and hide the
;;   local variables.  Derived modes which do additional printing
;;   could define their own frame sections.
;; backtrace-form: A value applied to each printed representation of a
;;   top-level s-expression, which needs to be different for sexps
;;   printed adjacent to each other, so the limits can be quickly
;;   found for pretty-printing.

(defsubst backtrace-get-index (&optional pos)
  "Return the index of the backtrace frame at POS.
The value is an index into `backtrace-frames', or nil.
POS, if omitted or nil, defaults to point."
  (get-text-property (or pos (point)) 'backtrace-index))