From d973d1fd4c7ab0de85e45d982a9ff225b7869f6b Mon Sep 17 00:00:00 2001 From: tomo Date: Fri, 16 Jun 2000 02:33:53 +0000 Subject: [PATCH] (insert-char-data): Add optional argument `readable'. (insert-char-data-with-variant): Likewise. (what-char-definition): Use `insert-char-data-with-variant' with `readable' mode. --- lisp/utf-2000/char-db-util.el | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lisp/utf-2000/char-db-util.el b/lisp/utf-2000/char-db-util.el index 1e4604a..5469061 100644 --- a/lisp/utf-2000/char-db-util.el +++ b/lisp/utf-2000/char-db-util.el @@ -113,7 +113,7 @@ ((symbolp kb) nil))) -(defun insert-char-data (char) +(defun insert-char-data (char &optional readable) (let ((data (char-attribute-alist char)) cell ret has-long-ccs-name rest radical strokes) @@ -338,7 +338,11 @@ (cond ((symbolp code) (symbol-name code)) ((characterp code) - (format "%S" code)) + (if readable + (format "%S" code) + (format "#x%04X" + (char-int code)) + )) ((integerp code) (format "#x%04X" code)) (t @@ -532,8 +536,8 @@ (insert (format "\t; %c" char))) ))))) -(defun insert-char-data-with-variant (char &optional script) - (insert-char-data char) +(defun insert-char-data-with-variant (char &optional script printable) + (insert-char-data char printable) (let ((variants (or (char-variants char) (let ((ucs (get-char-attribute char '->ucs))) (if ucs @@ -544,7 +548,7 @@ (if (or (null script) (null (setq vs (get-char-attribute variant 'script))) (memq script vs)) - (insert-char-data variant)) + (insert-char-data variant printable)) (setq variants (cdr variants)) ))) @@ -578,7 +582,7 @@ (erase-buffer) (condition-case err (progn - (insert-char-data-with-variant char) + (insert-char-data-with-variant char nil 'printable) ;; (char-db-update-comment) (set-buffer-modified-p nil) (view-mode the-buf (lambda (buf) -- 1.7.10.4