diff options
author | Richard M. Stallman <rms@gnu.org> | 1996-12-13 20:50:55 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1996-12-13 20:50:55 +0000 |
commit | 082f6929d6311ceb15e3de87b1166b5899ad3f29 (patch) | |
tree | 2512ccf92c293b6b3716c62cdeedd8cc0b9be375 /lisp/novice.el | |
parent | c9c0e4bb722115161f9eba5db65969c1bcbaa8cc (diff) | |
download | emacs-082f6929d6311ceb15e3de87b1166b5899ad3f29.tar.gz |
(disabled-command-hook): Correctly keep the first
paragraph of the command's documentation.
Diffstat (limited to 'lisp/novice.el')
-rw-r--r-- | lisp/novice.el | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/novice.el b/lisp/novice.el index 29594e6b7dc..424ef693fd1 100644 --- a/lisp/novice.el +++ b/lisp/novice.el @@ -62,14 +62,15 @@ If nil, the feature is disabled, i.e., all commands work normally.") ;; 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)))) |