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:
parent
963b492b63
commit
de62b4dfd0
@ -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
|
||||
|
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user