[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] master a62437d: Don't add `search-failed' to ignored e
From: |
Noam Postavsky |
Subject: |
Re: [Emacs-diffs] master a62437d: Don't add `search-failed' to ignored errors in info.el (Bug#6106) |
Date: |
Tue, 28 Mar 2017 10:19:18 -0400 |
On Tue, Mar 28, 2017 at 9:55 AM, Stefan Monnier
<address@hidden> wrote:
>
>> - (signal 'search-failed (list "\n\^_"))))
>> + (user-error "Search failed: `\n\^_'")))
>
> This one doesn't look like a user-error: the \n\^_ sequence is internal
> to Info files and mostly invisible to the user, so either we change the
> text so as to report the message in user-understandable terms, or we
> keep this as a (signal 'search-failed' ...).
Right. While I'm taking a second look at this, do you think the search
for "\n* Menu: " in Info-complete-menu-item should be a user error?
--- i/lisp/info.el
+++ w/lisp/info.el
@@ -2699,7 +2699,8 @@ Info-complete-menu-item
(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)