How do I get a list of Emacs lisp non-interactive functions?

后端 未结 6 2003
天涯浪人
天涯浪人 2021-02-02 16:17

How do I get a complete list of non-interactive functions that I can use in Emacs Lisp?

The interactive ones are easy enough to find in the help system, but I want a com

6条回答
  •  Happy的楠姐
    2021-02-02 16:38

    Here's the basic idea - see the Emacs Lisp manual for any unclear concepts.

    (flet ((first-line (text)
             (if text
                 (substring text 0 (string-match "\n" text))
               "")))
      (mapatoms 
       (lambda (x)
         (and (fboundp x)                          ; does x name a function?
              (not (commandp (symbol-function x))) ; is it non-interactive?
              (subrp (symbol-function x))          ; is it built-in?
              (insert (symbol-name x) " - " (first-line (documentation x)) "\n")))))
    

提交回复
热议问题