diff options
| author | Kenichi Handa | 2002-05-13 00:06:01 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2002-05-13 00:06:01 +0000 |
| commit | d2ac725b65f01ccc03c025eb9673403c4754c1c9 (patch) | |
| tree | 0d88d16d05505487063f22424f8fe70d1a115a3b /src | |
| parent | 4d8ff34d5ca44e0ee1cb8655e1710c17fed9ec0e (diff) | |
| download | emacs-d2ac725b65f01ccc03c025eb9673403c4754c1c9.tar.gz emacs-d2ac725b65f01ccc03c025eb9673403c4754c1c9.zip | |
(search_buffer): Give up boyer moore search if inverse
translation change charset_base.
Diffstat (limited to 'src')
| -rw-r--r-- | src/search.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/search.c b/src/search.c index d4d97726375..643a57d59ca 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -1229,7 +1229,11 @@ search_buffer (string, pos, pos_byte, lim, lim_byte, n, | |||
| 1229 | /* Keep track of which character set row | 1229 | /* Keep track of which character set row |
| 1230 | contains the characters that need translation. */ | 1230 | contains the characters that need translation. */ |
| 1231 | int charset_base_code = c & ~CHAR_FIELD3_MASK; | 1231 | int charset_base_code = c & ~CHAR_FIELD3_MASK; |
| 1232 | if (charset_base == -1) | 1232 | int inverse_charset_base = inverse & ~CHAR_FIELD3_MASK; |
| 1233 | |||
| 1234 | if (charset_base_code != inverse_charset_base) | ||
| 1235 | boyer_moore_ok = 0; | ||
| 1236 | else if (charset_base == -1) | ||
| 1233 | charset_base = charset_base_code; | 1237 | charset_base = charset_base_code; |
| 1234 | else if (charset_base != charset_base_code) | 1238 | else if (charset_base != charset_base_code) |
| 1235 | /* If two different rows appear, needing translation, | 1239 | /* If two different rows appear, needing translation, |