Mercurial > emacs
changeset 71987:6dd00de34fff
(compile_pattern_1): Use xsignal1.
(signal_failure): Remove (was only called once).
(search_command): Use xsignal1 instead of signal_failure.
author | Kim F. Storm <storm@cua.dk> |
---|---|
date | Tue, 18 Jul 2006 13:28:53 +0000 |
parents | de36a2bee064 |
children | 8d894204c732 |
files | src/search.c |
diffstat | 1 files changed, 6 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/search.c Tue Jul 18 13:28:45 2006 +0000 +++ b/src/search.c Tue Jul 18 13:28:53 2006 +0000 @@ -83,6 +83,9 @@ Lisp_Object Qinvalid_regexp; +/* Error condition used for failing searches */ +Lisp_Object Qsearch_failed; + Lisp_Object Vsearch_spaces_regexp; static void set_search_regs (); @@ -179,7 +182,7 @@ re_set_syntax (old); UNBLOCK_INPUT; if (val) - Fsignal (Qinvalid_regexp, Fcons (build_string (val), Qnil)); + xsignal1 (Qinvalid_regexp, build_string (val)); cp->regexp = Fcopy_sequence (pattern); } @@ -266,16 +269,6 @@ return &cp->buf; } -/* Error condition used for failing searches */ -Lisp_Object Qsearch_failed; - -Lisp_Object -signal_failure (arg) - Lisp_Object arg; -{ - Fsignal (Qsearch_failed, Fcons (arg, Qnil)); - return Qnil; -} static Lisp_Object looking_at_1 (string, posix) @@ -948,7 +941,8 @@ if (np <= 0) { if (NILP (noerror)) - return signal_failure (string); + xsignal1 (Qsearch_failed, string); + if (!EQ (noerror, Qt)) { if (lim < BEGV || lim > ZV)