(-windowDidResize:): Avoid inf-loop under GNUStep.
[bpt/emacs.git] / src / casefiddle.c
index af76a77..7317f61 100644 (file)
@@ -1,6 +1,6 @@
 /* GNU Emacs case conversion functions.
    Copyright (C) 1985, 1994, 1997, 1998, 1999, 2001, 2002, 2003, 2004,
-                 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+                 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -57,6 +57,12 @@ casify_object (flag, obj)
        return obj;
 
       c1 = XFASTINT (obj) & ~flagbits;
+      /* FIXME: Even if enable-multibyte-characters is nil, we may
+        manipulate multibyte chars.  This means we have a bug for latin-1
+        chars since when we receive an int 128-255 we can't tell whether
+        it's an eight-bit byte or a latin-1 char.  */
+      if (c1 >= 256)
+       multibyte = 1;
       if (! multibyte)
        MAKE_CHAR_MULTIBYTE (c1);
       c = DOWNCASE (c1);