From c04e918c728576d0e7700a6bcfeb6a68e4f8cf8b Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Sun, 25 Jan 2004 07:33:44 +0000 Subject: [PATCH] (define-charset): If :code-space is not given, generate it from :dimension. --- lisp/international/mule.el | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 757f4c1e049..976282bbf98 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -243,10 +243,18 @@ attribute." ;; If :dimension is omitted, get the dimension from :code-space. (let ((dimension (plist-get props :dimension))) (or dimension - (progn - (setq dimension (/ (length (plist-get props :code-space)) 2)) + (let ((code-space (plist-get props :code-space))) + (setq dimension (if code-space (/ (length code-space) 2) 4)) (setq props (plist-put props :dimension dimension))))) + (let ((code-space (plist-get props :code-space))) + (or code-space + (let ((dimension (plist-get props :dimension))) + (setq code-space (make-vector 8 0)) + (dotimes (i dimension) + (aset code-space (1+ (* i 2)) #xFF)) + (setq props (plist-put props :code-space code-space))))) + ;; If :emacs-mule-id is specified, update emacs-mule-charset-table. (let ((emacs-mule-id (plist-get props :emacs-mule-id))) (if (integerp emacs-mule-id) -- 2.39.2