From: tomo Date: Sat, 13 Nov 1999 19:41:01 +0000 (+0000) Subject: (char-db-update-comment): Use mapping-table for `arabic-iso8859-6'. X-Git-Tag: r21-2-19-utf-2000-0_12-0~67 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=74b961b1fa0fcdf72f0bbb4c4a3dd9c8e3ffac5a;p=chise%2Fxemacs-chise.git.1 (char-db-update-comment): Use mapping-table for `arabic-iso8859-6'. (insert-char-data-with-variant): New function. (insert-char-range-data): Use `insert-char-data-with-variant'. (what-char-definition): Use `insert-char-data-with-variant' instead of `insert-char-data'; use `char-db-update-comment'. --- diff --git a/lisp/utf-2000/char-db-util.el b/lisp/utf-2000/char-db-util.el index 1f58691..78c099b 100644 --- a/lisp/utf-2000/char-db-util.el +++ b/lisp/utf-2000/char-db-util.el @@ -321,25 +321,6 @@ (tabify (point-min)(point-max)) )))) -(defun insert-char-range-data (min max) - (let ((code min) - char - variants) - (while (<= code max) - (setq char (int-char code)) - (insert-char-data char) - (setq variants (char-variants char)) - (while variants - (insert-char-data (car variants)) - (setq variants (cdr variants))) - (setq code (1+ code)) - ))) - -(defun write-char-range-data-to-file (min max file) - (with-temp-buffer - (insert-char-range-data min max) - (write-region (point-min)(point-max) file))) - ;;;###autoload (defun char-db-update-comment () (interactive) @@ -353,7 +334,8 @@ (goto-char (match-end 0)) (setq char (if (or (memq (car cdef) '(ascii latin-viscii-upper - latin-viscii-lower)) + latin-viscii-lower + arabic-iso8859-6)) (= (char-int (charset-final (car cdef))) 0)) (apply (function make-char) cdef) (if (setq table (charset-mapping-table (car cdef))) @@ -363,12 +345,34 @@ (if table (set-charset-mapping-table (car cdef) table))))) (when (not (or (< (char-int char) 32) - (and (<= (char-int char) 128) + (and (<= 128 (char-int char)) (< (char-int char) 160)))) (delete-region (point) (point-at-eol)) (insert (format "\t; %c" char))) ))))) +(defun insert-char-data-with-variant (char) + (insert-char-data char) + (let ((variants (char-variants char))) + (while variants + (insert-char-data (car variants)) + (setq variants (cdr variants)) + ))) + +(defun insert-char-range-data (min max) + (let ((code min) + char + variants) + (while (<= code max) + (setq char (int-char code)) + (insert-char-data-with-variant char) + ))) + +(defun write-char-range-data-to-file (min max file) + (with-temp-buffer + (insert-char-range-data min max) + (write-region (point-min)(point-max) file))) + ;;;###autoload (defun what-char-definition (char) (interactive (list (char-after))) @@ -382,7 +386,8 @@ (erase-buffer) (condition-case err (progn - (insert-char-data char) + (insert-char-data-with-variant char) + (char-db-update-comment) (set-buffer-modified-p nil) (view-mode the-buf (lambda (buf) (set-window-configuration