aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2002-05-13 00:06:01 +0000
committerKenichi Handa2002-05-13 00:06:01 +0000
commitd2ac725b65f01ccc03c025eb9673403c4754c1c9 (patch)
tree0d88d16d05505487063f22424f8fe70d1a115a3b /src
parent4d8ff34d5ca44e0ee1cb8655e1710c17fed9ec0e (diff)
downloademacs-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.c6
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,