diff options
| author | Noam Postavsky | 2017-04-01 09:34:04 -0400 |
|---|---|---|
| committer | Noam Postavsky | 2017-04-03 19:36:14 -0400 |
| commit | 3887c54544bc2e5f8c2e7c12973887f9b2b88c40 (patch) | |
| tree | 28023c5157ac0504d3f3cefd65943304e140ab36 /src | |
| parent | 49197e6e3d30a4da91d5f18041dd125ac327592a (diff) | |
| download | emacs-3887c54544bc2e5f8c2e7c12973887f9b2b88c40.tar.gz emacs-3887c54544bc2e5f8c2e7c12973887f9b2b88c40.zip | |
Throw a `search-failed' derived error in Info search
The original fix for Bug#6106 switched from signalling `search-failed'
to `user-error'. However, this breaks incremental searching over
multiple nodes because the isearch code doesn't expect a `user-error'.
* src/search.c (syms_of_search): New error, `user-search-failed',
with `user-error' and `search-failed' as parents.
* doc/lispref/errors.texi (Standard Errors): Document it.
* etc/NEWS: Announce it.
* lisp/info.el (Info-search): Use it instead of `user-error' so that
isearch will handle failed searches correctly.
Diffstat (limited to 'src')
| -rw-r--r-- | src/search.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/search.c b/src/search.c index 33cb02aa7af..c0deb57213c 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -3389,6 +3389,10 @@ syms_of_search (void) | |||
| 3389 | /* Error condition used for failing searches. */ | 3389 | /* Error condition used for failing searches. */ |
| 3390 | DEFSYM (Qsearch_failed, "search-failed"); | 3390 | DEFSYM (Qsearch_failed, "search-failed"); |
| 3391 | 3391 | ||
| 3392 | /* Error condition used for failing searches started by user, i.e., | ||
| 3393 | where failure should not invoke the debugger. */ | ||
| 3394 | DEFSYM (Quser_search_failed, "user-search-failed"); | ||
| 3395 | |||
| 3392 | /* Error condition signaled when regexp compile_pattern fails. */ | 3396 | /* Error condition signaled when regexp compile_pattern fails. */ |
| 3393 | DEFSYM (Qinvalid_regexp, "invalid-regexp"); | 3397 | DEFSYM (Qinvalid_regexp, "invalid-regexp"); |
| 3394 | 3398 | ||
| @@ -3397,6 +3401,12 @@ syms_of_search (void) | |||
| 3397 | Fput (Qsearch_failed, Qerror_message, | 3401 | Fput (Qsearch_failed, Qerror_message, |
| 3398 | build_pure_c_string ("Search failed")); | 3402 | build_pure_c_string ("Search failed")); |
| 3399 | 3403 | ||
| 3404 | Fput (Quser_search_failed, Qerror_conditions, | ||
| 3405 | listn (CONSTYPE_PURE, 4, | ||
| 3406 | Quser_search_failed, Quser_error, Qsearch_failed, Qerror)); | ||
| 3407 | Fput (Quser_search_failed, Qerror_message, | ||
| 3408 | build_pure_c_string ("Search failed")); | ||
| 3409 | |||
| 3400 | Fput (Qinvalid_regexp, Qerror_conditions, | 3410 | Fput (Qinvalid_regexp, Qerror_conditions, |
| 3401 | listn (CONSTYPE_PURE, 2, Qinvalid_regexp, Qerror)); | 3411 | listn (CONSTYPE_PURE, 2, Qinvalid_regexp, Qerror)); |
| 3402 | Fput (Qinvalid_regexp, Qerror_message, | 3412 | Fput (Qinvalid_regexp, Qerror_message, |