Mercurial > emacs
changeset 13358:febf5ce4532c
(describe-function): Call documentation just once.
(describe-key): Likewise.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 31 Oct 1995 00:43:22 +0000 |
parents | 74a891e3ef44 |
children | 4c60f92bdaa6 |
files | lisp/help.el |
diffstat | 1 files changed, 10 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/help.el Tue Oct 31 00:01:29 1995 +0000 +++ b/lisp/help.el Tue Oct 31 00:43:22 1995 +0000 @@ -296,9 +296,11 @@ (princ " runs the command ") (prin1 defn) (princ ":\n") - (if (documentation defn) - (princ (documentation defn)) - (princ "not documented")) + (let ((doc (documentation defn))) + (if doc + (progn (terpri) + (princ doc)) + (princ "not documented"))) (save-excursion (set-buffer standard-output) (help-mode)) @@ -567,11 +569,11 @@ (intern (upcase (symbol-name arg))))) arglist))) (terpri)))) - (if (documentation function) - (progn (terpri) - (princ (documentation function))) - (princ "not documented")) - ) + (let ((doc (documentation function))) + (if doc + (progn (terpri) + (princ doc)) + (princ "not documented")))) (print-help-return-message) (save-excursion (set-buffer standard-output)