Function: js--get-all-known-symbols

js--get-all-known-symbols is a byte-compiled function defined in js.el.gz.

Signature

(js--get-all-known-symbols)

Documentation

Return a hash table of all JavaScript symbols.

This searches all existing js-mode buffers. Each key is the name of a symbol (possibly disambiguated with <N>, where N > 1), and each value is a marker giving the location of that symbol.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/js.el.gz
(defun js--get-all-known-symbols ()
  "Return a hash table of all JavaScript symbols.
This searches all existing `js-mode' buffers.  Each key is the
name of a symbol (possibly disambiguated with <N>, where N > 1),
and each value is a marker giving the location of that symbol."
  (cl-loop with symbols = (make-hash-table :test 'equal)
           with imenu-use-markers = t
           for buffer being the buffers
           for imenu-index = (with-current-buffer buffer
                               (when (derived-mode-p 'js-mode)
                                 (js--imenu-create-index)))
           do (js--imenu-to-flat imenu-index "" symbols)
           finally return symbols))