Commit 082f6929 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(disabled-command-hook): Correctly keep the first

paragraph of the command's documentation.
parent c9c0e4bb
......@@ -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.
(set-buffer "*Help*")
(goto-char (point-min))
(goto-char (point-max))
(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))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment