我该如何获取Emacs Lisp中可以使用的全部非交互式函数列表,包括concat, car, cdr等(最好还有它们的文档)?查找交互函数在帮助系统中很容易,但我想要一个完整的非交互式函数列表。谢谢。
(flet ((first-line (text)
(if text
(substring text 0 (string-match "\n" text))
"")))
(let ((funclist (list)))
(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?
(add-to-list 'funclist
(concat (symbol-name x) " - " (first-line (documentation x))
"\n")))))
(dolist (item (sort funclist 'string<))
(insert item))))