aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman1996-12-13 20:50:55 +0000
committerRichard M. Stallman1996-12-13 20:50:55 +0000
commit082f6929d6311ceb15e3de87b1166b5899ad3f29 (patch)
tree2512ccf92c293b6b3716c62cdeedd8cc0b9be375 /lisp
parentc9c0e4bb722115161f9eba5db65969c1bcbaa8cc (diff)
downloademacs-082f6929d6311ceb15e3de87b1166b5899ad3f29.tar.gz
emacs-082f6929d6311ceb15e3de87b1166b5899ad3f29.zip
(disabled-command-hook): Correctly keep the first
paragraph of the command's documentation.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/novice.el11
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.")
62 ;; Print any special message saying why the command is disabled. 62 ;; Print any special message saying why the command is disabled.
63 (if (stringp (get this-command 'disabled)) 63 (if (stringp (get this-command 'disabled))
64 (princ (get this-command 'disabled))) 64 (princ (get this-command 'disabled)))
65 (princ (or (condition-case ()
66 (documentation this-command)
67 (error nil))
68 "<< not documented >>"))
69 ;; Keep only the first paragraph of the documentation. 65 ;; Keep only the first paragraph of the documentation.
70 (save-excursion 66 (save-excursion
71 (set-buffer "*Help*") 67 (set-buffer "*Help*")
72 (goto-char (point-min)) 68 (goto-char (point-max))
69 (save-excursion
70 (princ (or (condition-case ()
71 (documentation this-command)
72 (error nil))
73 "<< not documented >>")))
73 (if (search-forward "\n\n" nil t) 74 (if (search-forward "\n\n" nil t)
74 (delete-region (1- (point)) (point-max)) 75 (delete-region (1- (point)) (point-max))
75 (goto-char (point-max)))) 76 (goto-char (point-max))))