1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-20 18:17:20 +00:00

international/ucs-normalize.el: If decomposition property of CHAR is the default one (i.e. a list of CHAR itself), treat it as nil.

This commit is contained in:
Kenichi Handa 2011-08-24 16:33:55 +09:00
parent 963b492b63
commit de62b4dfd0
2 changed files with 15 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2011-08-24 Kenichi Handa <handa@m17n.org>
* international/ucs-normalize.el: If decomposition property of
CHAR is the default one (i.e. a list of CHAR itself), treat it as
nil.
(nfd, nfkd): Likewise.
2011-08-24 Stefan Monnier <monnier@iro.umontreal.ca>
* mpc.el (mpc--proc-filter): Don't signal mpc-proc-error since signals

View File

@ -139,14 +139,17 @@
(defun nfd (char)
(let ((decomposition
(get-char-code-property char 'decomposition)))
(if (and decomposition (numberp (car decomposition)))
(if (and decomposition (numberp (car decomposition))
(or (> (length decomposition) 1)
(/= (car decomposition) char)))
decomposition)))
(defun nfkd (char)
(let ((decomposition
(get-char-code-property char 'decomposition)))
(if (symbolp (car decomposition)) (cdr decomposition)
decomposition)))
(if (or (> (length decomposition) 1)
(/= (car decomposition) char)) decomposition))))
(defun hfs-nfd (char)
(when (or (and (>= char 0) (< char #x2000))
@ -180,6 +183,9 @@
(setq ccc (ucs-normalize-ccc char))
(setq decomposition (get-char-code-property
char 'decomposition))
(if (and (= (length decomposition) 1)
(= (car decomposition) char))
(setq decomposition nil))
(if (and ccc (/= 0 ccc)) (add-to-list 'combining-chars char))
(if (and (numberp (car decomposition))
(/= (ucs-normalize-ccc (car decomposition))