aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2006-07-18 13:28:53 +0000
committerKim F. Storm2006-07-18 13:28:53 +0000
commit06f77a8a2f6ce2790bb51987ad539748dae5ab43 (patch)
tree799512cf1c3b5b1d2caed28b6c03e52861138197 /src
parentebe061ca4d57ec8074f81a8af4b2b4c11fc67bb0 (diff)
downloademacs-06f77a8a2f6ce2790bb51987ad539748dae5ab43.tar.gz
emacs-06f77a8a2f6ce2790bb51987ad539748dae5ab43.zip
(compile_pattern_1): Use xsignal1.
(signal_failure): Remove (was only called once). (search_command): Use xsignal1 instead of signal_failure.
Diffstat (limited to 'src')
-rw-r--r--src/search.c18
1 files 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;
83 83
84Lisp_Object Qinvalid_regexp; 84Lisp_Object Qinvalid_regexp;
85 85
86/* Error condition used for failing searches */
87Lisp_Object Qsearch_failed;
88
86Lisp_Object Vsearch_spaces_regexp; 89Lisp_Object Vsearch_spaces_regexp;
87 90
88static void set_search_regs (); 91static void set_search_regs ();
@@ -179,7 +182,7 @@ compile_pattern_1 (cp, pattern, translate, regp, posix, multibyte)
179 re_set_syntax (old); 182 re_set_syntax (old);
180 UNBLOCK_INPUT; 183 UNBLOCK_INPUT;
181 if (val) 184 if (val)
182 Fsignal (Qinvalid_regexp, Fcons (build_string (val), Qnil)); 185 xsignal1 (Qinvalid_regexp, build_string (val));
183 186
184 cp->regexp = Fcopy_sequence (pattern); 187 cp->regexp = Fcopy_sequence (pattern);
185} 188}
@@ -266,16 +269,6 @@ compile_pattern (pattern, regp, translate, posix, multibyte)
266 return &cp->buf; 269 return &cp->buf;
267} 270}
268 271
269/* Error condition used for failing searches */
270Lisp_Object Qsearch_failed;
271
272Lisp_Object
273signal_failure (arg)
274 Lisp_Object arg;
275{
276 Fsignal (Qsearch_failed, Fcons (arg, Qnil));
277 return Qnil;
278}
279 272
280static Lisp_Object 273static Lisp_Object
281looking_at_1 (string, posix) 274looking_at_1 (string, posix)
@@ -948,7 +941,8 @@ search_command (string, bound, noerror, count, direction, RE, posix)
948 if (np <= 0) 941 if (np <= 0)
949 { 942 {
950 if (NILP (noerror)) 943 if (NILP (noerror))
951 return signal_failure (string); 944 xsignal1 (Qsearch_failed, string);
945
952 if (!EQ (noerror, Qt)) 946 if (!EQ (noerror, Qt))
953 { 947 {
954 if (lim < BEGV || lim > ZV) 948 if (lim < BEGV || lim > ZV)