comparison src/search.c @ 72725:ef0421dfce16

(looking_at_1, string_match_1, search_command): Make syntax table's canon table point to eqv table.
author Richard M. Stallman <rms@gnu.org>
date Fri, 08 Sep 2006 12:07:07 +0000
parents 6dd00de34fff
children d4ecc69b8d2e a1a25ac6c88a
comparison
equal deleted inserted replaced
72724:63d522f27621 72725:ef0421dfce16
165 cp->regexp = Qnil; 165 cp->regexp = Qnil;
166 cp->buf.translate = (! NILP (translate) ? translate : make_number (0)); 166 cp->buf.translate = (! NILP (translate) ? translate : make_number (0));
167 cp->posix = posix; 167 cp->posix = posix;
168 cp->buf.multibyte = multibyte; 168 cp->buf.multibyte = multibyte;
169 cp->whitespace_regexp = Vsearch_spaces_regexp; 169 cp->whitespace_regexp = Vsearch_spaces_regexp;
170 /* Doing BLOCK_INPUT here has the effect that
171 the debugger won't run if an error occurs.
172 Why is BLOCK_INPUT needed here? */
170 BLOCK_INPUT; 173 BLOCK_INPUT;
171 old = re_set_syntax (RE_SYNTAX_EMACS 174 old = re_set_syntax (RE_SYNTAX_EMACS
172 | (posix ? 0 : RE_NO_POSIX_BACKTRACKING)); 175 | (posix ? 0 : RE_NO_POSIX_BACKTRACKING));
173 176
174 re_set_whitespace_regexp (NILP (Vsearch_spaces_regexp) ? NULL 177 re_set_whitespace_regexp (NILP (Vsearch_spaces_regexp) ? NULL
282 struct re_pattern_buffer *bufp; 285 struct re_pattern_buffer *bufp;
283 286
284 if (running_asynch_code) 287 if (running_asynch_code)
285 save_search_regs (); 288 save_search_regs ();
286 289
290 /* This is so set_image_of_range_1 in regex.c can find the EQV table. */
291 XCHAR_TABLE (current_buffer->case_canon_table)->extras[2]
292 = current_buffer->case_eqv_table;
293
287 CHECK_STRING (string); 294 CHECK_STRING (string);
288 bufp = compile_pattern (string, &search_regs, 295 bufp = compile_pattern (string, &search_regs,
289 (!NILP (current_buffer->case_fold_search) 296 (!NILP (current_buffer->case_fold_search)
290 ? current_buffer->case_canon_table : Qnil), 297 ? current_buffer->case_canon_table : Qnil),
291 posix, 298 posix,
388 pos = len + pos; 395 pos = len + pos;
389 else if (0 > pos || pos > len) 396 else if (0 > pos || pos > len)
390 args_out_of_range (string, start); 397 args_out_of_range (string, start);
391 pos_byte = string_char_to_byte (string, pos); 398 pos_byte = string_char_to_byte (string, pos);
392 } 399 }
400
401 /* This is so set_image_of_range_1 in regex.c can find the EQV table. */
402 XCHAR_TABLE (current_buffer->case_canon_table)->extras[2]
403 = current_buffer->case_eqv_table;
393 404
394 bufp = compile_pattern (regexp, &search_regs, 405 bufp = compile_pattern (regexp, &search_regs,
395 (!NILP (current_buffer->case_fold_search) 406 (!NILP (current_buffer->case_fold_search)
396 ? current_buffer->case_canon_table : Qnil), 407 ? current_buffer->case_canon_table : Qnil),
397 posix, 408 posix,
927 else if (lim < BEGV) 938 else if (lim < BEGV)
928 lim = BEGV, lim_byte = BEGV_BYTE; 939 lim = BEGV, lim_byte = BEGV_BYTE;
929 else 940 else
930 lim_byte = CHAR_TO_BYTE (lim); 941 lim_byte = CHAR_TO_BYTE (lim);
931 } 942 }
943
944 /* This is so set_image_of_range_1 in regex.c can find the EQV table. */
945 XCHAR_TABLE (current_buffer->case_canon_table)->extras[2]
946 = current_buffer->case_eqv_table;
932 947
933 np = search_buffer (string, PT, PT_BYTE, lim, lim_byte, n, RE, 948 np = search_buffer (string, PT, PT_BYTE, lim, lim_byte, n, RE,
934 (!NILP (current_buffer->case_fold_search) 949 (!NILP (current_buffer->case_fold_search)
935 ? current_buffer->case_canon_table 950 ? current_buffer->case_canon_table
936 : Qnil), 951 : Qnil),