emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: char-table-range


From: Luc Teirlinck
Subject: Re: char-table-range
Date: Fri, 20 Feb 2004 18:03:11 -0600 (CST)

Richard Stallman wrote:

       The second thing that looks _somewhat_ strange (but maybe it is OK) is
       that (make-char-table subtype init) will also set extra slots to INIT.
       This is somewhat unexpected because a logical default for characters
       would seldom seem to make sense for extra slots as well.  Maybe this
       is intentional anyway.

   It looks like a misfeature to me.  But before changing it, we had
   better see if anything depends on it.  I think that means looking at
   all the calls to make-char-table and checking each one.

   Can you do that?

It seems to be used (?) in exactly one place in the Emacs source code
(if I did not overlook anything): china-util.el

There we find the function `expand-euc-big5-alist' which is defined
inside an eval-when-compile and it is normally not defined at runtime.

It contains the line:

  (let ((chartable (make-char-table 'translation-table #xFF))

`chartable' is used in the return value. This sets all values,
including extra slots to #xFF = 255.  `expand-euc-big5-alist' is used
to put a translation-table property on the symbol `big5-to-cns' (whose
actual value as a variable is another translation table).  The value
of that translation-table property has its two extra slots set to 255.

Ielm run illustrating the above:

===File ~/china-util-ielm===================================
*** Welcome to IELM ***  Type (describe-mode) for help.
ELISP> (load "china-util")
t
ELISP> (setq tt (get 'big5-to-cns 'translation-table))
;; Long ouput omitted
ELISP> (char-table-extra-slot tt 0)
255
ELISP> (char-table-extra-slot tt 1)
255
ELISP> (expand-euc-big5-alist nil)
*** Eval error ***  Symbol's function definition is void: expand-euc-big5-alist
ELISP> (load "china-util.el")
t
ELISP> (expand-euc-big5-alist nil)
#^[t 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 
255 255 255 255 255 255 255 255 !
 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 
255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 255 
nil translation-table 255 255]

ELISP> 
============================================================




reply via email to

[Prev in Thread] Current Thread [Next in Thread]