Mercurial > emacs
comparison src/search.c @ 90601:a1a25ac6c88a
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 427-436)
- Update from CVS
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 134-136)
- Merge from emacs--devo--0
- Update from CVS
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-110
author | Miles Bader <miles@gnu.org> |
---|---|
date | Thu, 14 Sep 2006 09:24:00 +0000 |
parents | 8a8e69664178 ef0421dfce16 |
children | b5c13d1564a9 |
comparison
equal
deleted
inserted
replaced
90600:84dd84b43e1b | 90601:a1a25ac6c88a |
---|---|
132 cp->buf.translate = (! NILP (translate) ? translate : make_number (0)); | 132 cp->buf.translate = (! NILP (translate) ? translate : make_number (0)); |
133 cp->posix = posix; | 133 cp->posix = posix; |
134 cp->buf.multibyte = STRING_MULTIBYTE (pattern); | 134 cp->buf.multibyte = STRING_MULTIBYTE (pattern); |
135 cp->buf.target_multibyte = multibyte; | 135 cp->buf.target_multibyte = multibyte; |
136 cp->whitespace_regexp = Vsearch_spaces_regexp; | 136 cp->whitespace_regexp = Vsearch_spaces_regexp; |
137 /* Doing BLOCK_INPUT here has the effect that | |
138 the debugger won't run if an error occurs. | |
139 Why is BLOCK_INPUT needed here? */ | |
137 BLOCK_INPUT; | 140 BLOCK_INPUT; |
138 old = re_set_syntax (RE_SYNTAX_EMACS | 141 old = re_set_syntax (RE_SYNTAX_EMACS |
139 | (posix ? 0 : RE_NO_POSIX_BACKTRACKING)); | 142 | (posix ? 0 : RE_NO_POSIX_BACKTRACKING)); |
140 re_set_whitespace_regexp (NILP (Vsearch_spaces_regexp) ? NULL | 143 re_set_whitespace_regexp (NILP (Vsearch_spaces_regexp) ? NULL |
141 : SDATA (Vsearch_spaces_regexp)); | 144 : SDATA (Vsearch_spaces_regexp)); |
248 struct re_pattern_buffer *bufp; | 251 struct re_pattern_buffer *bufp; |
249 | 252 |
250 if (running_asynch_code) | 253 if (running_asynch_code) |
251 save_search_regs (); | 254 save_search_regs (); |
252 | 255 |
256 /* This is so set_image_of_range_1 in regex.c can find the EQV table. */ | |
257 XCHAR_TABLE (current_buffer->case_canon_table)->extras[2] | |
258 = current_buffer->case_eqv_table; | |
259 | |
253 CHECK_STRING (string); | 260 CHECK_STRING (string); |
254 bufp = compile_pattern (string, &search_regs, | 261 bufp = compile_pattern (string, &search_regs, |
255 (!NILP (current_buffer->case_fold_search) | 262 (!NILP (current_buffer->case_fold_search) |
256 ? current_buffer->case_canon_table : Qnil), | 263 ? current_buffer->case_canon_table : Qnil), |
257 posix, | 264 posix, |
354 pos = len + pos; | 361 pos = len + pos; |
355 else if (0 > pos || pos > len) | 362 else if (0 > pos || pos > len) |
356 args_out_of_range (string, start); | 363 args_out_of_range (string, start); |
357 pos_byte = string_char_to_byte (string, pos); | 364 pos_byte = string_char_to_byte (string, pos); |
358 } | 365 } |
366 | |
367 /* This is so set_image_of_range_1 in regex.c can find the EQV table. */ | |
368 XCHAR_TABLE (current_buffer->case_canon_table)->extras[2] | |
369 = current_buffer->case_eqv_table; | |
359 | 370 |
360 bufp = compile_pattern (regexp, &search_regs, | 371 bufp = compile_pattern (regexp, &search_regs, |
361 (!NILP (current_buffer->case_fold_search) | 372 (!NILP (current_buffer->case_fold_search) |
362 ? current_buffer->case_canon_table : Qnil), | 373 ? current_buffer->case_canon_table : Qnil), |
363 posix, | 374 posix, |
893 else if (lim < BEGV) | 904 else if (lim < BEGV) |
894 lim = BEGV, lim_byte = BEGV_BYTE; | 905 lim = BEGV, lim_byte = BEGV_BYTE; |
895 else | 906 else |
896 lim_byte = CHAR_TO_BYTE (lim); | 907 lim_byte = CHAR_TO_BYTE (lim); |
897 } | 908 } |
909 | |
910 /* This is so set_image_of_range_1 in regex.c can find the EQV table. */ | |
911 XCHAR_TABLE (current_buffer->case_canon_table)->extras[2] | |
912 = current_buffer->case_eqv_table; | |
898 | 913 |
899 np = search_buffer (string, PT, PT_BYTE, lim, lim_byte, n, RE, | 914 np = search_buffer (string, PT, PT_BYTE, lim, lim_byte, n, RE, |
900 (!NILP (current_buffer->case_fold_search) | 915 (!NILP (current_buffer->case_fold_search) |
901 ? current_buffer->case_canon_table | 916 ? current_buffer->case_canon_table |
902 : Qnil), | 917 : Qnil), |