Fix using disabled command without a docstring
* lisp/novice.el (disabled-command-function): Fix error when the disable command has no docstring. (Bug#67835)
This commit is contained in:
parent
f68f350023
commit
67d9af1c07
1 changed files with 4 additions and 3 deletions
|
@ -67,9 +67,10 @@ If nil, the feature is disabled, i.e., all commands work normally.")
|
|||
"Here's the first part of its description:\n\n")
|
||||
;; Keep only the first paragraph of the documentation.
|
||||
(with-temp-buffer
|
||||
(insert (condition-case ()
|
||||
(documentation cmd)
|
||||
(error "<< not documented >>")))
|
||||
(insert (or (condition-case ()
|
||||
(documentation cmd)
|
||||
(error nil))
|
||||
"<< not documented >>"))
|
||||
(goto-char (point-min))
|
||||
(when (search-forward "\n\n" nil t)
|
||||
(delete-region (match-beginning 0) (point-max)))
|
||||
|
|
Loading…
Add table
Reference in a new issue