1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00

(describe-function): Call documentation just once.

(describe-key): Likewise.
This commit is contained in:
Richard M. Stallman 1995-10-31 00:43:22 +00:00
parent a97eb3f351
commit fb3fc9b819

View File

@ -296,9 +296,11 @@ If FUNCTION is nil, applies `message' to it, thus printing it."
(princ " runs the command ") (princ " runs the command ")
(prin1 defn) (prin1 defn)
(princ ":\n") (princ ":\n")
(if (documentation defn) (let ((doc (documentation defn)))
(princ (documentation defn)) (if doc
(princ "not documented")) (progn (terpri)
(princ doc))
(princ "not documented")))
(save-excursion (save-excursion
(set-buffer standard-output) (set-buffer standard-output)
(help-mode)) (help-mode))
@ -567,11 +569,11 @@ C-w print information on absence of warranty for GNU Emacs."
(intern (upcase (symbol-name arg))))) (intern (upcase (symbol-name arg)))))
arglist))) arglist)))
(terpri)))) (terpri))))
(if (documentation function) (let ((doc (documentation function)))
(progn (terpri) (if doc
(princ (documentation function))) (progn (terpri)
(princ "not documented")) (princ doc))
) (princ "not documented"))))
(print-help-return-message) (print-help-return-message)
(save-excursion (save-excursion
(set-buffer standard-output) (set-buffer standard-output)