Function: js--pitem-format
js--pitem-format is a byte-compiled function defined in js.el.gz.
Signature
(js--pitem-format PITEM)
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/js.el.gz
;;; Type database and Imenu
;; We maintain a cache of semantic information, i.e., the classes and
;; functions we've encountered so far. In order to avoid having to
;; re-parse the buffer on every change, we cache the parse state at
;; each interesting point in the buffer. Each parse state is a
;; modified copy of the previous one, or in the case of the first
;; parse state, the empty state.
;;
;; The parse state itself is just a stack of js--pitem
;; instances. It starts off containing one element that is never
;; closed, that is initially js--initial-pitem.
;;
(defun js--pitem-format (pitem)
(let ((name (js--pitem-name pitem))
(type (js--pitem-type pitem)))
(format "name:%S type:%S"
name
(if (atom type)
type
(plist-get type :name)))))