改成了nadvice的来练习一下:
(advice-add
'elisp-get-fnsym-args-string :around
(lambda (oldfun sym &rest args)
"If SYM is a function, append its docstring."
(concat
(apply oldfun sym args)
(let* ((doc (and (fboundp sym) (documentation sym 'raw)))
(oneline (and doc (substring doc 0 (string-match "\n" doc)))))
(and oneline
(stringp oneline)
(not (string= "" oneline))
(concat " | " (propertize oneline 'face 'italic))))))
'((name . "docstring")))