From d707ba846902128572f420241897cbb966363ede Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Tue, 28 Mar 2017 10:10:34 -0400 Subject: [PATCH] Adjust some search failure errors in info.el * lisp/info.el (Info-select-node): The search for beginning of node is an internal detail, and is not normally expected to fail, so it should not be a user error. (Info-complete-menu-item): Failing to find a menu indicates the user searched for a menu when there isn't one, so change to `use-error'. --- lisp/info.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/info.el b/lisp/info.el index a06c868fb3d..a6bab290a72 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -1672,7 +1672,7 @@ escaped (\\\",\\\\)." (forward-line 2) (if (looking-at "\^_") (forward-line 1) - (user-error "Search failed: `\n\^_'"))) + (signal 'search-failed (list "\n\^_")))) ;; Get nodename spelled as it is in the node. (re-search-forward "Node:[ \t]*") (setq Info-current-node @@ -2699,7 +2699,8 @@ Because of ambiguities, this should be concatenated with something like (orignode Info-current-node) nextnode) (goto-char (point-min)) - (search-forward "\n* Menu:") + (unless (search-forward "\n* Menu:" nil t) + (user-error "No menu in this node")) (cond ((eq (car-safe action) 'boundaries) nil) ((eq action 'lambda)