X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/f58e0fd503567288bb30e243595acaa589034929..3d889773617a882fbee5992960cfe18866cddc34:/lisp/international/ucs-normalize.el diff --git a/lisp/international/ucs-normalize.el b/lisp/international/ucs-normalize.el index 54566e1d00..74978ce38a 100644 --- a/lisp/international/ucs-normalize.el +++ b/lisp/international/ucs-normalize.el @@ -1,6 +1,6 @@ ;;; ucs-normalize.el --- Unicode normalization NFC/NFD/NFKD/NFKC -;; Copyright (C) 2009-2012 Free Software Foundation, Inc. +;; Copyright (C) 2009-2016 Free Software Foundation, Inc. ;; Author: Taichi Kawabata ;; Keywords: unicode, normalization @@ -131,7 +131,7 @@ This list is taken from http://www.unicode.org/Public/UNIDATA/5.2/CompositionExclusions.txt") - ;; Unicode ranges that decompositions & combinings are defined. + ;; Unicode ranges that decompositions & combining characters are defined. (defvar check-range nil) (setq check-range '((#x00a0 . #x3400) (#xA600 . #xAC00) (#xF900 . #x110ff) (#x1d000 . #x1dfff) (#x1f100 . #x1f2ff) (#x2f800 . #x2faff))) @@ -176,6 +176,13 @@ (setq decomposition-pair-to-composition nil) (defvar non-starter-decompositions nil) (setq non-starter-decompositions nil) + ;; This file needs to access these 2 Unicode properties, but when we + ;; compile it during bootstrap, charprop.el was not built yet, and + ;; therefore is not yet loaded into bootstrap-emacs, so + ;; char-code-property-alist is nil, and get-char-code-property + ;; always returns nil, something the code here doesn't like. + (define-char-code-property 'decomposition "uni-decomposition.el") + (define-char-code-property 'canonical-combining-class "uni-combining.el") (let ((char 0) ccc decomposition) (mapc (lambda (start-end) @@ -627,6 +634,10 @@ be decomposed." :pre-write-conversion 'ucs-normalize-hfs-nfd-pre-write-conversion ) +;; This is tested in dired.c:file_name_completion in order to reject +;; false positives due to comparison of encoded file names. +(coding-system-put 'utf-8-hfs 'decomposed-characters 't) + (provide 'ucs-normalize) ;; Local Variables: