From 06f77a8a2f6ce2790bb51987ad539748dae5ab43 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Tue, 18 Jul 2006 13:28:53 +0000 Subject: [PATCH] (compile_pattern_1): Use xsignal1. (signal_failure): Remove (was only called once). (search_command): Use xsignal1 instead of signal_failure. --- src/search.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/search.c b/src/search.c index fe124091009..5d532a9d8dd 100644 --- a/src/search.c +++ b/src/search.c @@ -83,6 +83,9 @@ static Lisp_Object last_thing_searched; 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 @@ compile_pattern_1 (cp, pattern, translate, regp, posix, multibyte) 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 @@ compile_pattern (pattern, regp, translate, posix, multibyte) 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 @@ search_command (string, bound, noerror, count, direction, RE, posix) if (np <= 0) { if (NILP (noerror)) - return signal_failure (string); + xsignal1 (Qsearch_failed, string); + if (!EQ (noerror, Qt)) { if (lim < BEGV || lim > ZV) -- 2.39.2