[Top][All Lists]
[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: |
Sun, 15 Feb 2004 19:30:20 -0600 (CST) |
Ken'ichi Handa wrote:
Luc pointed out the current odd behaviour of
char-table-range. What should we do if values of characters
in the specified range are different?
Maybe it should be clarified that this was pointed out in private
email while discussing a fix to another bug (so people do not start
searching the archives for a non-existing report).
The current behavior for ascii and eight-bit-{graphic,contol} is so
odd that it probably can be safely called a bug. Note that in the
ielm run below (char-table-range cc 'ascii) actually returns the value
specified for eight-bit-control. For other charsets (I took ipa as
example), things would seem to be OK.
My own opinion would be to have char-table-range return the default
value, except for ascii and eight-bit-{control,graphic} which do not
have a default value. For those it would seem to me that the best
thing to do would be to throw an error.
===File ~/char-table-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 deleted.
ELISP> (set-char-table-range cc 'ascii 1)
1
ELISP> (set-char-table-range cc 'eight-bit-control 2)
2
ELISP> (set-char-table-range cc 'eight-bit-graphic 3)
3
ELISP> (set-char-table-range cc 'ipa 4)
4
ELISP> (char-table-range cc 'ascii)
2
ELISP> (char-table-range cc 'eight-bit-graphic)
nil
ELISP> (char-table-range cc 'eight-bit-control)
nil
ELISP> (char-table-range cc 'ipa)
4
ELISP>
============================================================
Re: char-table-range, Luc Teirlinck, 2004/02/15
Re: char-table-range, Richard Stallman, 2004/02/18