emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 67d9af1c074: Fix using disabled command without a docstring


From: Stefan Kangas
Subject: emacs-29 67d9af1c074: Fix using disabled command without a docstring
Date: Sat, 16 Dec 2023 14:37:50 -0500 (EST)

branch: emacs-29
commit 67d9af1c074e0b0ad301ecca91f7bae0531076d1
Author: Stefan Kangas <stefankangas@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>

    Fix using disabled command without a docstring
    
    * lisp/novice.el (disabled-command-function): Fix error when the
    disable command has no docstring.  (Bug#67835)
---
 lisp/novice.el | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/novice.el b/lisp/novice.el
index 05e4bfc91c9..907126ab49b 100644
--- a/lisp/novice.el
+++ b/lisp/novice.el
@@ -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)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]