aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorMichal Nazarewicz2016-09-07 21:00:57 +0200
committerMichal Nazarewicz2017-02-15 16:54:07 +0100
commit6220faeb4e9be16b9dec728e72ea8dff2cfe35ba (patch)
treed329bc3c65eb858ea8f03a2705ea5de696abac05 /etc
parent5ec3a58462e99533ea5200de356302181d634d0b (diff)
downloademacs-6220faeb4e9be16b9dec728e72ea8dff2cfe35ba.tar.gz
emacs-6220faeb4e9be16b9dec728e72ea8dff2cfe35ba.zip
casing: don’t assume letters are *either* upper- or lower-case (bug#24603)
A compatibility digraph characters, such as Dž, are neither upper- nor lower-case. At the moment however, those are reported as upper-case¹ despite the fact that they change when upper-cased. Stop checking if a character is upper-case before trying to up-case it so that title-case characters are handled correctly. This fixes one of the issues mentioned in bug#24603. ¹ Because they change when converted to lower-case. Notice an asymmetry in that for a character to be considered lower-case it must not be upper-case (plus the usual condition of changing when upper-cased). * src/buffer.h (upcase1): Delete. (upcase): Change to upcase character unconditionally just like downcase does it. This is what upcase1 was. * src/casefiddle.c (casify_object, casify_region): Use upcase instead of upcase1 and don’t check !uppercasep(x) before calling upcase. * src/keyboard.c (read_key_sequence): Don’t check if uppercase(x), just downcase(x) and see if it changed. * test/src/casefiddle-tests.el (casefiddle-tests--characters, casefiddle-tests-casing): Update test cases which are now passing.
Diffstat (limited to 'etc')
-rw-r--r--etc/NEWS8
1 files changed, 7 insertions, 1 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 421e5daa3e4..a54c655c36d 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -338,6 +338,12 @@ same as in modes where the character is not whitespace.
338Instead of only checking the modification time, Emacs now also checks 338Instead of only checking the modification time, Emacs now also checks
339the file's actual content before prompting the user. 339the file's actual content before prompting the user.
340 340
341** Title case characters are properly converted to upper case.
342'upcase', 'upcase-region' et al. convert title case characters (such
343as Dz) into their upper case form (such as DZ). As a downside,
344'capitalize' and 'upcase-initials' produce awkward words where first
345two letters are upper case, e.g. DŽungla (instead of Džungla).
346
341 347
342* Changes in Specialized Modes and Packages in Emacs 26.1 348* Changes in Specialized Modes and Packages in Emacs 26.1
343 349
@@ -1028,7 +1034,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
1028 1034
1029 1035
1030Local variables: 1036Local variables:
1031coding: us-ascii 1037coding: utf-8
1032mode: outline 1038mode: outline
1033paragraph-separate: "[ ]*$" 1039paragraph-separate: "[ ]*$"
1034end: 1040end: