From: Kenichi Handa Date: Sun, 25 Jan 2004 07:33:44 +0000 (+0000) Subject: (define-charset): If :code-space is not given, generate it from X-Git-Tag: emacs-pretest-23.0.90~8295^2~1613 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c04e918c728576d0e7700a6bcfeb6a68e4f8cf8b;p=emacs.git (define-charset): If :code-space is not given, generate it from :dimension. --- 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)