diff options
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/international/ucs-normalize.el | 10 |
2 files changed, 15 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 85253feacc5..2a33661c9c5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2011-08-24 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * international/ucs-normalize.el: If decomposition property of | ||
| 4 | CHAR is the default one (i.e. a list of CHAR itself), treat it as | ||
| 5 | nil. | ||
| 6 | (nfd, nfkd): Likewise. | ||
| 7 | |||
| 1 | 2011-08-24 Stefan Monnier <monnier@iro.umontreal.ca> | 8 | 2011-08-24 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 9 | ||
| 3 | * mpc.el (mpc--proc-filter): Don't signal mpc-proc-error since signals | 10 | * mpc.el (mpc--proc-filter): Don't signal mpc-proc-error since signals |
diff --git a/lisp/international/ucs-normalize.el b/lisp/international/ucs-normalize.el index f83e0f7588f..df05b355b46 100644 --- a/lisp/international/ucs-normalize.el +++ b/lisp/international/ucs-normalize.el | |||
| @@ -139,14 +139,17 @@ | |||
| 139 | (defun nfd (char) | 139 | (defun nfd (char) |
| 140 | (let ((decomposition | 140 | (let ((decomposition |
| 141 | (get-char-code-property char 'decomposition))) | 141 | (get-char-code-property char 'decomposition))) |
| 142 | (if (and decomposition (numberp (car decomposition))) | 142 | (if (and decomposition (numberp (car decomposition)) |
| 143 | (or (> (length decomposition) 1) | ||
| 144 | (/= (car decomposition) char))) | ||
| 143 | decomposition))) | 145 | decomposition))) |
| 144 | 146 | ||
| 145 | (defun nfkd (char) | 147 | (defun nfkd (char) |
| 146 | (let ((decomposition | 148 | (let ((decomposition |
| 147 | (get-char-code-property char 'decomposition))) | 149 | (get-char-code-property char 'decomposition))) |
| 148 | (if (symbolp (car decomposition)) (cdr decomposition) | 150 | (if (symbolp (car decomposition)) (cdr decomposition) |
| 149 | decomposition))) | 151 | (if (or (> (length decomposition) 1) |
| 152 | (/= (car decomposition) char)) decomposition)))) | ||
| 150 | 153 | ||
| 151 | (defun hfs-nfd (char) | 154 | (defun hfs-nfd (char) |
| 152 | (when (or (and (>= char 0) (< char #x2000)) | 155 | (when (or (and (>= char 0) (< char #x2000)) |
| @@ -180,6 +183,9 @@ | |||
| 180 | (setq ccc (ucs-normalize-ccc char)) | 183 | (setq ccc (ucs-normalize-ccc char)) |
| 181 | (setq decomposition (get-char-code-property | 184 | (setq decomposition (get-char-code-property |
| 182 | char 'decomposition)) | 185 | char 'decomposition)) |
| 186 | (if (and (= (length decomposition) 1) | ||
| 187 | (= (car decomposition) char)) | ||
| 188 | (setq decomposition nil)) | ||
| 183 | (if (and ccc (/= 0 ccc)) (add-to-list 'combining-chars char)) | 189 | (if (and ccc (/= 0 ccc)) (add-to-list 'combining-chars char)) |
| 184 | (if (and (numberp (car decomposition)) | 190 | (if (and (numberp (car decomposition)) |
| 185 | (/= (ucs-normalize-ccc (car decomposition)) | 191 | (/= (ucs-normalize-ccc (car decomposition)) |