Mercurial > emacs
changeset 104540:fc0ed6b4a2b2
(nfd, decomposition-translation-alist, decomposition-char-recursively)
(alist-list-to-vector, quick-check-list, quick-check-list-to-regexp):
Declare.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sat, 22 Aug 2009 19:14:37 +0000 |
parents | 7d4a9e8bcfb8 |
children | f54e4dfe90e2 |
files | lisp/international/ucs-normalize.el |
diffstat | 1 files changed, 23 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/international/ucs-normalize.el Sat Aug 22 19:13:34 2009 +0000 +++ b/lisp/international/ucs-normalize.el Sat Aug 22 19:14:37 2009 +0000 @@ -88,8 +88,8 @@ ;; with previous character, then the beginning of the block is ;; the searched character. If searched character is combining ;; character, then previous character will be the target -;; character -;; (2) end of the block +;; character +;; (2) end of the block ;; Block ends at non-composable starter character. ;; ;; C. Decomposition (`ucs-normalize-block') @@ -112,6 +112,8 @@ (eval-when-compile (require 'cl)) +(declare-function nfd "ucs-normalize" (char)) + (eval-when-compile (defconst ucs-normalize-composition-exclusions @@ -166,7 +168,7 @@ (eval-when-compile - (defvar combining-chars nil) + (defvar combining-chars nil) (setq combining-chars nil) (defvar decomposition-pair-to-composition nil) (setq decomposition-pair-to-composition nil) @@ -199,9 +201,9 @@ check-range)) (setq combining-chars - (append combining-chars + (append combining-chars '(?ᅡ ?ᅢ ?ᅣ ?ᅤ ?ᅥ ?ᅦ ?ᅧ ?ᅨ ?ᅩ ?ᅪ - ?ᅫ ?ᅬ ?ᅭ ?ᅮ ?ᅯ ?ᅰ ?ᅱ ?ᅲ ?ᅳ ?ᅴ ?ᅵ + ?ᅫ ?ᅬ ?ᅭ ?ᅮ ?ᅯ ?ᅰ ?ᅱ ?ᅲ ?ᅳ ?ᅴ ?ᅵ ?ᆨ ?ᆩ ?ᆪ ?ᆫ ?ᆬ ?ᆭ ?ᆮ ?ᆯ ?ᆰ ?ᆱ ?ᆲ ?ᆳ ?ᆴ ?ᆵ ?ᆶ ?ᆷ ?ᆸ ?ᆹ ?ᆺ ?ᆻ ?ᆼ ?ᆽ ?ᆾ ?ᆿ ?ᇀ ?ᇁ ?ᇂ))) ) @@ -251,6 +253,12 @@ (setq ucs-normalize-combining-chars-regexp (eval-when-compile (concat (regexp-opt (mapcar 'char-to-string combining-chars)) "+"))) +(declare-function decomposition-translation-alist "ucs-normalize" + (decomposition-function)) +(declare-function decomposition-char-recursively "ucs-normalize" + (char decomposition-function)) +(declare-function alist-list-to-vector "ucs-normalize" (alist)) + (eval-when-compile (defun decomposition-translation-alist (decomposition-function) @@ -262,7 +270,7 @@ (if decomposition (setq alist (cons (cons char (apply 'append - (mapcar (lambda (x) + (mapcar (lambda (x) (decomposition-char-recursively x decomposition-function)) decomposition))) @@ -274,7 +282,7 @@ (let ((decomposition (funcall decomposition-function char))) (if decomposition (apply 'append - (mapcar (lambda (x) + (mapcar (lambda (x) (decomposition-char-recursively x decomposition-function)) decomposition)) (list char)))) @@ -295,8 +303,8 @@ (setq ucs-normalize-hangul-translation-alist (let ((i 0) entries) (while (< i 11172) - (setq entries - (cons (cons (+ #xac00 i) + (setq entries + (cons (cons (+ #xac00 i) (if (= 0 (% i 28)) (vector (+ #x1100 (/ i 588)) (+ #x1161 (/ (% i 588) 28))) @@ -307,7 +315,7 @@ i (1+ i))) entries)) (defun ucs-normalize-make-translation-table-from-alist (alist) - (make-translation-table-from-alist + (make-translation-table-from-alist (append alist ucs-normalize-hangul-translation-alist))) (define-translation-table 'ucs-normalize-nfd-table @@ -364,6 +372,10 @@ chars))) ) +(declare-function quick-check-list "ucs-normalize" + (decomposition-translation &optional composition-predicate)) +(declare-function quick-check-list-to-regexp "ucs-normalize" (quick-check-list)) + (eval-when-compile (defun quick-check-list (decomposition-translation @@ -377,7 +389,7 @@ (do ((i (car start-end) (+ i 1))) ((> i (cdr start-end))) (setq decomposition (string-to-list - (with-temp-buffer + (with-temp-buffer (insert i) (translate-region 1 2 decomposition-translation) (buffer-string))))