]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't add `search-failed' to ignored errors in info.el (Bug#6106)
authorNoam Postavsky <npostavs@gmail.com>
Fri, 24 Mar 2017 03:54:58 +0000 (23:54 -0400)
committerNoam Postavsky <npostavs@gmail.com>
Tue, 28 Mar 2017 00:18:20 +0000 (20:18 -0400)
* lisp/info.el: Stop adding `search-failed' to `debug-ignored-errors'.
(Info-select-node, Info-search): Replace (signal 'search-failed ...)
with (user-error "Search failed: "...).

lisp/info.el

index 8dc85f48a438d9f1edb64ceef8f70a81e95b4dc6..a06c868fb3d3821e711f92e1c1c3e1edb11ce127 100644 (file)
@@ -1672,7 +1672,7 @@ escaped (\\\",\\\\)."
          (forward-line 2)
        (if (looking-at "\^_")
            (forward-line 1)
-         (signal 'search-failed (list "\n\^_"))))
+         (user-error "Search failed: `\n\^_'")))
       ;; Get nodename spelled as it is in the node.
       (re-search-forward "Node:[ \t]*")
       (setq Info-current-node
@@ -1998,19 +1998,20 @@ If DIRECTION is `backward', search in the reverse direction."
                   Info-isearch-initial-node
                   bound
                   (and found (> found opoint-min) (< found opoint-max)))
-       (signal 'search-failed (list regexp "end of node")))
+       (user-error "Search failed: `%s' (end of node)" regexp))
 
       ;; If no subfiles, give error now.
       (unless (or found Info-current-subfile)
         (if isearch-mode
-            (signal 'search-failed (list regexp "end of manual"))
+            (user-error "Search failed: `%s' (end of manual)" regexp)
           (let ((search-spaces-regexp Info-search-whitespace-regexp))
-            (if backward
-                (re-search-backward regexp)
-              (re-search-forward regexp)))))
+            (unless (if backward
+                        (re-search-backward regexp nil t)
+                      (re-search-forward regexp nil t))
+              (user-error "Search failed: `%s'" regexp)))))
 
       (if (and bound (not found))
-         (signal 'search-failed (list regexp)))
+          (user-error "Search failed: `%s'" regexp))
 
       (unless (or found bound)
        (unwind-protect
@@ -2054,9 +2055,8 @@ If DIRECTION is `backward', search in the reverse direction."
                    (setq list nil)))
              (if found
                  (message "")
-               (signal 'search-failed (if isearch-mode
-                                          (list regexp "end of manual")
-                                        (list regexp)))))
+                (user-error "Search failed: `%s'%s"
+                            regexp (if isearch-mode " (end of manual)" ""))))
          (if (not found)
              (progn (Info-read-subfile osubfile)
                     (goto-char opoint)
@@ -5237,9 +5237,6 @@ BUFFER is the buffer speedbar is requesting buttons for."
       (erase-buffer))
   (Info-speedbar-hierarchy-buttons nil 0))
 
-;; FIXME: Really?  Why here?
-(add-to-list 'debug-ignored-errors 'search-failed)
-
 ;;;;  Desktop support
 
 (defun Info-desktop-buffer-misc-data (_desktop-dirname)