]> git.eshelyaron.com Git - emacs.git/commitdiff
Signal user-error in info--ensure-not-in-directory-node
authorStefan Kangas <stefankangas@gmail.com>
Wed, 26 Mar 2025 20:39:18 +0000 (21:39 +0100)
committerEshel Yaron <me@eshelyaron.com>
Thu, 27 Mar 2025 10:12:51 +0000 (11:12 +0100)
* lisp/info.el (info--ensure-not-in-directory-node): Change from 'error'
to 'user-error' to reduce 'debug-on-error' frustration.

(cherry picked from commit c00170e92c5c3f68734e0e2d632d6efdcbb9c969)

lisp/info.el

index 48902a9f5c87128e115365c2fe1abe90d061ebf0..5b52eb20d839ef87d945c50c9b0091eef16a17f0 100644 (file)
@@ -3514,9 +3514,9 @@ If FILE is nil, check the current Info file."
 (defun info--ensure-not-in-directory-node ()
   (if (equal (downcase (file-name-nondirectory Info-current-file))
              "dir")
-      (error (substitute-command-keys
-              (concat "The Info directory node has no index; "
-                      "type \\[Info-menu] to select a manual")))))
+      (user-error (substitute-command-keys
+                   (concat "The Info directory node has no index; "
+                           "type `\\[Info-menu]' to select a manual")))))
 
 ;;;###autoload
 (defun Info-index (topic)