Listing all top-level global variables in emacs

Basically, for my own instruction, I am trying to list all the global variables loaded in the current Emacs session. What I was thinking about was creating an HTML file with all of the above functions. Of course, what would be useful is the file in which the functions, var, etc. were defined.

Is there something already built into emacs?

l -

+4
source share
1 answer

Something in this direction should be done:

(let ((result '())) (mapatoms (lambda (x) (when (boundp x) (let ((file (ignore-errors (find-lisp-object-file-name x 'defvar)))) (when file (push (cons x file) result)))))) result) 

Warning: it takes a long time to complete.

+8
source

Source: https://habr.com/ru/post/1379920/


All Articles