[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to get all commands defined in a specified file (or files)?
From: |
Michael Heerdegen |
Subject: |
Re: How to get all commands defined in a specified file (or files)? |
Date: |
Tue, 12 Nov 2024 17:12:54 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Stefan Monnier via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:
> Look for the file in `load-history`, that will give you a list of all
> the functions/vars/types/faces/... defined in there.
Or use the shortcut `feature-symbols', like in
#+begin_src emacs-lisp
(require 'seq)
(seq-filter #'commandp
(mapcar #'cdr
(seq-filter (lambda (entry) (eq (car-safe entry) 'defun))
(feature-symbols 'MY-LIB))))
#+end_src
AFAIU this will only work when MY-LIB is loaded. And I dunno if
this is correct when MY-LIB is used in natively compiled form. The
implementation of `symbol-file' suggests that it is not.
Michael.