Mercurial > emacs
changeset 16675:6f45dc8d9d56
(disabled-command-hook): Correctly keep the first
paragraph of the command's documentation.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 13 Dec 1996 20:50:55 +0000 |
parents | 91590d8f74c3 |
children | 82e54a854639 |
files | lisp/novice.el |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/novice.el Fri Dec 13 01:49:23 1996 +0000 +++ b/lisp/novice.el Fri Dec 13 20:50:55 1996 +0000 @@ -62,14 +62,15 @@ ;; Print any special message saying why the command is disabled. (if (stringp (get this-command 'disabled)) (princ (get this-command 'disabled))) - (princ (or (condition-case () - (documentation this-command) - (error nil)) - "<< not documented >>")) ;; Keep only the first paragraph of the documentation. (save-excursion (set-buffer "*Help*") - (goto-char (point-min)) + (goto-char (point-max)) + (save-excursion + (princ (or (condition-case () + (documentation this-command) + (error nil)) + "<< not documented >>"))) (if (search-forward "\n\n" nil t) (delete-region (1- (point)) (point-max)) (goto-char (point-max))))