diff options
| author | Juanma Barranquero | 2014-03-27 18:34:22 +0100 |
|---|---|---|
| committer | Juanma Barranquero | 2014-03-27 18:34:22 +0100 |
| commit | 1e757eb0a5bab2bdd26de8a6553ee5c2b2e2a381 (patch) | |
| tree | 01db12aa0584e566f44f32c062a67f98ea836837 /src/editfns.c | |
| parent | b9b37dd04e6f60ef16738efe1b396a9e0a461d86 (diff) | |
| parent | 0c4e715c98919593413a76a0ab1458b0d10ea287 (diff) | |
| download | emacs-1e757eb0a5bab2bdd26de8a6553ee5c2b2e2a381.tar.gz emacs-1e757eb0a5bab2bdd26de8a6553ee5c2b2e2a381.zip | |
Merge from emacs-24; up to 2014-03-24T03:06:35Z!dancol@dancol.org
Diffstat (limited to 'src/editfns.c')
| -rw-r--r-- | src/editfns.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/editfns.c b/src/editfns.c index 1986ee53d23..9c1fcb0b790 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -4377,13 +4377,23 @@ Case is ignored if `case-fold-search' is non-nil in the current buffer. */) | |||
| 4377 | if (NILP (BVAR (current_buffer, case_fold_search))) | 4377 | if (NILP (BVAR (current_buffer, case_fold_search))) |
| 4378 | return Qnil; | 4378 | return Qnil; |
| 4379 | 4379 | ||
| 4380 | /* FIXME: When enable-multibyte-characters is nil, it's still possible | ||
| 4381 | to manipulate multibyte chars, which means there is a bug for chars | ||
| 4382 | in the range 128-255 as we can't tell whether they are eight-bit | ||
| 4383 | bytes or Latin-1 chars. For now, assume the latter. See Bug#17011. | ||
| 4384 | Also see casefiddle.c's casify_object, which has a similar problem. */ | ||
| 4385 | i1 = XFASTINT (c1); | 4380 | i1 = XFASTINT (c1); |
| 4386 | i2 = XFASTINT (c2); | 4381 | i2 = XFASTINT (c2); |
| 4382 | |||
| 4383 | /* FIXME: It is possible to compare multibyte characters even when | ||
| 4384 | the current buffer is unibyte. Unfortunately this is ambiguous | ||
| 4385 | for characters between 128 and 255, as they could be either | ||
| 4386 | eight-bit raw bytes or Latin-1 characters. Assume the former for | ||
| 4387 | now. See Bug#17011, and also see casefiddle.c's casify_object, | ||
| 4388 | which has a similar problem. */ | ||
| 4389 | if (NILP (BVAR (current_buffer, enable_multibyte_characters))) | ||
| 4390 | { | ||
| 4391 | if (SINGLE_BYTE_CHAR_P (i1)) | ||
| 4392 | i1 = UNIBYTE_TO_CHAR (i1); | ||
| 4393 | if (SINGLE_BYTE_CHAR_P (i2)) | ||
| 4394 | i2 = UNIBYTE_TO_CHAR (i2); | ||
| 4395 | } | ||
| 4396 | |||
| 4387 | return (downcase (i1) == downcase (i2) ? Qt : Qnil); | 4397 | return (downcase (i1) == downcase (i2) ? Qt : Qnil); |
| 4388 | } | 4398 | } |
| 4389 | 4399 | ||