diff options
| author | Richard M. Stallman | 1995-10-31 00:43:22 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-10-31 00:43:22 +0000 |
| commit | fb3fc9b81904633fc4445ff1d7ca3bd2e97515b2 (patch) | |
| tree | 90f5d7bb2d89729ac68d116523d29ae5fa6e76ca | |
| parent | a97eb3f351a0ea70ae5a7c51458163bc1fef21e7 (diff) | |
| download | emacs-fb3fc9b81904633fc4445ff1d7ca3bd2e97515b2.tar.gz emacs-fb3fc9b81904633fc4445ff1d7ca3bd2e97515b2.zip | |
(describe-function): Call documentation just once.
(describe-key): Likewise.
| -rw-r--r-- | lisp/help.el | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lisp/help.el b/lisp/help.el index 68c18ecd48a..f17484fe9f4 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -296,9 +296,11 @@ If FUNCTION is nil, applies `message' to it, thus printing it." | |||
| 296 | (princ " runs the command ") | 296 | (princ " runs the command ") |
| 297 | (prin1 defn) | 297 | (prin1 defn) |
| 298 | (princ ":\n") | 298 | (princ ":\n") |
| 299 | (if (documentation defn) | 299 | (let ((doc (documentation defn))) |
| 300 | (princ (documentation defn)) | 300 | (if doc |
| 301 | (princ "not documented")) | 301 | (progn (terpri) |
| 302 | (princ doc)) | ||
| 303 | (princ "not documented"))) | ||
| 302 | (save-excursion | 304 | (save-excursion |
| 303 | (set-buffer standard-output) | 305 | (set-buffer standard-output) |
| 304 | (help-mode)) | 306 | (help-mode)) |
| @@ -567,11 +569,11 @@ C-w print information on absence of warranty for GNU Emacs." | |||
| 567 | (intern (upcase (symbol-name arg))))) | 569 | (intern (upcase (symbol-name arg))))) |
| 568 | arglist))) | 570 | arglist))) |
| 569 | (terpri)))) | 571 | (terpri)))) |
| 570 | (if (documentation function) | 572 | (let ((doc (documentation function))) |
| 571 | (progn (terpri) | 573 | (if doc |
| 572 | (princ (documentation function))) | 574 | (progn (terpri) |
| 573 | (princ "not documented")) | 575 | (princ doc)) |
| 574 | ) | 576 | (princ "not documented")))) |
| 575 | (print-help-return-message) | 577 | (print-help-return-message) |
| 576 | (save-excursion | 578 | (save-excursion |
| 577 | (set-buffer standard-output) | 579 | (set-buffer standard-output) |