From 33675e2603a277ca9546c7f08245d584ced1d0ba Mon Sep 17 00:00:00 2001 From: tomo Date: Tue, 26 Feb 2002 11:15:33 +0000 Subject: [PATCH] (file-name-char-attribute-name) New function. Use `file-name-char-attribute-name' to get character attribute names. --- lisp/utf-2000/make-cdbs.el | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/lisp/utf-2000/make-cdbs.el b/lisp/utf-2000/make-cdbs.el index 2ecc050..93f46c7 100644 --- a/lisp/utf-2000/make-cdbs.el +++ b/lisp/utf-2000/make-cdbs.el @@ -34,8 +34,27 @@ (dolist (ccs (charset-list)) (save-charset-mapping-table ccs))) +(defun file-name-char-attribute-name (filename) + (let ((i 0) + (base 0) + (len (length filename)) + chr dest) + (while (< i len) + (if (eq (setq chr (aref filename i)) ?%) + (setq dest (concat dest + (substring filename base i) + (char-to-string + (int-char + (string-to-int + (substring filename (1+ i) (+ i 3)) 16)))) + i (+ i 3) + base i) + (setq i (1+ i)))) + (concat dest (substring filename base len)))) + (mapcar (lambda (file) - (reset-char-attribute-table (intern file))) + (reset-char-attribute-table + (intern (file-name-char-attribute-name file)))) (directory-files (expand-file-name "system-char-id" system-char-database-directory) -- 1.7.10.4