[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master d707ba8: Adjust some search failure errors in info.
From: |
Noam Postavsky |
Subject: |
[Emacs-diffs] master d707ba8: Adjust some search failure errors in info.el |
Date: |
Tue, 28 Mar 2017 21:26:08 -0400 (EDT) |
branch: master
commit d707ba846902128572f420241897cbb966363ede
Author: Noam Postavsky <address@hidden>
Commit: Noam Postavsky <address@hidden>
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 a06c868..a6bab29 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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master d707ba8: Adjust some search failure errors in info.el,
Noam Postavsky <=