Elisp Eldoc 默认只显示参数表,我觉得显示文档也很有用。
(define-advice elisp-get-fnsym-args-string (:around (orig-fun sym &rest r) docstring)
"If SYM is a function, append its docstring."
(concat
(apply orig-fun sym r)
(let* ((doc (and (fboundp sym) (documentation sym 'raw)))
(oneline (and doc (substring doc 0 (string-match "\n" doc)))))
(and oneline
(concat " | " (propertize oneline 'face 'italic))))))