Commit de62b4df authored by Kenichi Handa's avatar Kenichi Handa
Browse files

international/ucs-normalize.el: If decomposition property of CHAR is the...

international/ucs-normalize.el: If decomposition property of CHAR is the default one (i.e. a list of CHAR itself), treat it as nil.
parent 963b492b
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
......
......@@ -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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment