bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#16731: 24.3.50; Latin small letter sharp s is not considered lower-c


From: Andreas Röhler
Subject: bug#16731: 24.3.50; Latin small letter sharp s is not considered lower-case
Date: Thu, 13 Feb 2014 19:02:08 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.2.0

Am 13.02.2014 18:39, schrieb Eli Zaretskii:
From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: andreas.roehler@easy-emacs.de,  16731@debbugs.gnu.org
Date: Thu, 13 Feb 2014 12:10:49 -0500

  /* True if C is upper case.  */
-INLINE bool uppercasep (int c) { return downcase (c) != c; }
+INLINE bool uppercasep (int c)
+{
+  Lisp_Object val;
+
+  if (downcase (c) != c)
+    return true;
+
+  if (NILP (Vunicode_category_table))
+    return false;
+
+  val = CHAR_TABLE_REF (Vunicode_category_table, c);
+  return INTEGERP (val) && XINT (val) == UNICODE_CATEGORY_Lu;
+}

Doesn't sound too bad.  But it does beg the question: why check
(downcase (c) != c) at all, then?

Because it's faster, and for most characters will do the job.


Maybe I'm missing the point: all change needed is not to store "ß" into the 
uppercase-table.
Why not store nil there instead?






reply via email to

[Prev in Thread] Current Thread [Next in Thread]