systty.h systime.h dispextern.h syntax.h $(INTERVAL_SRC) blockinput.h \
atimer.h xterm.h puresize.h msdos.h keymap.h w32term.h macterm.h $(config_h)
keymap.o: keymap.c buffer.h commands.h keyboard.h termhooks.h blockinput.h \
- atimer.h systime.h puresize.h character.h intervals.h $(config_h)
- atimer.h systime.h puresize.h charset.h intervals.h keymap.h window.h \
++ atimer.h systime.h puresize.h character.h intervals.h keymap.h window.h \
+ $(config_h)
lastfile.o: lastfile.c $(config_h)
macros.o: macros.c window.h buffer.h commands.h macros.h keyboard.h \
dispextern.h $(config_h)
cp->regexp = Qnil;
cp->buf.translate = (! NILP (translate) ? translate : make_number (0));
cp->posix = posix;
- cp->buf.multibyte = multibyte;
+ cp->buf.multibyte = STRING_MULTIBYTE (pattern);
+ cp->buf.target_multibyte = multibyte;
cp->whitespace_regexp = Vsearch_spaces_regexp;
+ cp->syntax_table = current_buffer->syntax_table;
/* Doing BLOCK_INPUT here has the effect that
the debugger won't run if an error occurs.
Why is BLOCK_INPUT needed here? */
&& !NILP (Fstring_equal (cp->regexp, pattern))
&& EQ (cp->buf.translate, (! NILP (translate) ? translate : make_number (0)))
&& cp->posix == posix
- && cp->buf.multibyte == multibyte
+ && cp->buf.target_multibyte == multibyte
+ /* TODO: Strictly speaking, we only need to match syntax
+ tables when a character class like [[:space:]] occurs in
+ the pattern. -- cyd*/
+ && EQ (cp->syntax_table, current_buffer->syntax_table)
&& !NILP (Fequal (cp->whitespace_regexp, Vsearch_spaces_regexp)))
break;
else
check_syntax_table (syntax_table);
- SET_RAW_SYNTAX_ENTRY (syntax_table, XINT (c), Fstring_to_syntax (newentry));
+ newentry = Fstring_to_syntax (newentry);
+ if (CONSP (c))
+ SET_RAW_SYNTAX_ENTRY_RANGE (syntax_table, c, newentry);
+ else
+ SET_RAW_SYNTAX_ENTRY (syntax_table, XINT (c), newentry);
+
+ /* We clear the regexp cache, since character classes can now have
+ different values from those in the compiled regexps.*/
+ clear_regexp_cache ();
+
return Qnil;
}
\f