emacs-devel
[Top][All Lists]
Advanced

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

set-char-table-range with charset arguments


From: Luc Teirlinck
Subject: set-char-table-range with charset arguments
Date: Wed, 10 Dec 2003 20:13:54 -0600 (CST)

There are several mistakes and omissions in `(elisp)Char-Tables',
which I am trying to correct.  However, there are things I quite
simply do not understand and which do not seem to be documented
anywhere.  For instance, in the ielm run below, ascii seems to get
treated as completely _synonymous_ with 128.  Setting the entire ascii
range seems to affect 128 and no other character.  Similar things
happen with eight-bit-graphic (synonymous with 256) and
eight-bit-control.

The ielm run below first shows the expected behavior for the character
set ipa to show the contrast with the strange behavior for ascii.

Is that behavior a bug or does it serve some purpose?  If the latter,
where is that purpose documented?  (What is the value stored in 128
used for and where is it explained what it is used for?)  Maybe
set-char-table-range was never designed to work with the three
character sets without generic characters, but in that case, should it
not throw an error instead of doing cryptic stuff?

===File ~/ascii-ielm========================================
*** Welcome to IELM ***  Type (describe-mode) for help.
ELISP> (put 'five-slots 'char-table-extra-slots 5)
5
ELISP> (setq cc (make-char-table 'five-slots))
;; Long output omitted.
ELISP> (make-char 'ipa)
6272
ELISP> (set-char-table-range cc 'ipa "ipa")
"ipa"
ELISP> (aref cc 6272)
"ipa"
ELISP> (aref cc 6300)
"ipa"
ELISP> (aset cc 6272 1001)
1001
ELISP> (aref cc 6300)
1001
ELISP> (set-char-table-range cc 'ascii 1)
1
ELISP> (make-char 'ascii)
0
ELISP> (aref cc 0)
nil
ELISP> (aref cc 32)
nil
ELISP> (aref cc 128)
1
ELISP> (aref cc 129)
nil
ELISP> (char-table-range cc 'ascii)
1
ELISP> (aset cc 128 10)
10
ELISP> (char-table-range cc 'ascii)
10
ELISP> (char-valid-p 128)
t
ELISP> (char-valid-p 6272)
nil
ELISP> 
============================================================




reply via email to

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