summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog5
-rw-r--r--src/editfns.c15
2 files changed, 10 insertions, 10 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 72d9f60002a..bf27ece6af7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,10 @@
2014-03-26 Paul Eggert <eggert@cs.ucla.edu>
+ Fix core dump in char-equal (Bug#17011).
+ * editfns.c (Fchar_equal): Do not use MAKE_CHAR_MULTIBYTE in
+ unibyte buffers, as we can't tell whether the characters are
+ actually unibyte.
+
* insdel.c (adjust_markers_for_delete): Remove unused local.
2014-03-24 Barry O'Reilly <gundaetiapo@gmail.com>
diff --git a/src/editfns.c b/src/editfns.c
index 5018020a11b..1986ee53d23 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -4377,18 +4377,13 @@ Case is ignored if `case-fold-search' is non-nil in the current buffer. */)
if (NILP (BVAR (current_buffer, case_fold_search)))
return Qnil;
+ /* FIXME: When enable-multibyte-characters is nil, it's still possible
+ to manipulate multibyte chars, which means there is a bug for chars
+ in the range 128-255 as we can't tell whether they are eight-bit
+ bytes or Latin-1 chars. For now, assume the latter. See Bug#17011.
+ Also see casefiddle.c's casify_object, which has a similar problem. */
i1 = XFASTINT (c1);
- if (NILP (BVAR (current_buffer, enable_multibyte_characters))
- && ! ASCII_CHAR_P (i1))
- {
- MAKE_CHAR_MULTIBYTE (i1);
- }
i2 = XFASTINT (c2);
- if (NILP (BVAR (current_buffer, enable_multibyte_characters))
- && ! ASCII_CHAR_P (i2))
- {
- MAKE_CHAR_MULTIBYTE (i2);
- }
return (downcase (i1) == downcase (i2) ? Qt : Qnil);
}