/* 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.
#include <config.h>
+#include <setjmp.h>
#include "lisp.h"
#include "buffer.h"
#include "character.h"
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);
for (i = 0; i < size; i++)
{
c = SREF (obj, i);
- MAKE_CHAR_MULTIBYTE (c);
+ MAKE_CHAR_MULTIBYTE (c);
c1 = c;
if (inword && flag != CASE_CAPITALIZE_UP)
c = DOWNCASE (c);