From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: char-table-range Date: Sun, 15 Feb 2004 20:12:37 -0600 (CST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200402160212.i1G2Cbq04302@raven.dms.auburn.edu> References: <200402160043.JAA17207@etlken.m17n.org> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1076897754 23742 80.91.224.253 (16 Feb 2004 02:15:54 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 16 Feb 2004 02:15:54 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Feb 16 03:15:48 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AsYIW-0004GD-00 for ; Mon, 16 Feb 2004 03:15:48 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AsYIW-0002hm-00 for ; Mon, 16 Feb 2004 03:15:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AsYGY-0000mv-Gt for emacs-devel@quimby.gnus.org; Sun, 15 Feb 2004 21:13:46 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AsYGS-0000kU-MZ for emacs-devel@gnu.org; Sun, 15 Feb 2004 21:13:40 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AsYFw-0000hF-Tp for emacs-devel@gnu.org; Sun, 15 Feb 2004 21:13:39 -0500 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AsYFw-0000gs-LS for emacs-devel@gnu.org; Sun, 15 Feb 2004 21:13:08 -0500 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id i1G2CvKt012826; Sun, 15 Feb 2004 20:12:57 -0600 (CST) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.6+Sun/8.11.6) id i1G2Cbq04302; Sun, 15 Feb 2004 20:12:37 -0600 (CST) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: handa@m17n.org In-reply-to: <200402160043.JAA17207@etlken.m17n.org> (message from Kenichi Handa on Mon, 16 Feb 2004 09:43:14 +0900 (JST)) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:19962 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19962 Ken'ichi Handa wrote: What should we do if values of characters in the specified range are different? For the moment, I don't have a good idea. Possible behaviours are: (1) return nil (2) return the first non-nil value in the range. (3) return the default value of the range (but ascii, eight-bit-XXXX doesn't have a default value). (4) signal an error I did not realize that currently, for charsets different from ascii and eight-bit-{control,graphic}, char-table-range actually returns the entire range of values if the value is not uniform. So this could be a fifth possibility, since it appears to be the current situation: ===File ~/char-table-ielm-b================================= *** 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)) ELISP> (make-char 'ipa) 6272 ELISP> (set-char-table-default cc 6272 1) 1 ELISP> (char-table-range cc 'ipa) 1 ELISP> (split-char 6320) (ipa 48) ELISP> (aset cc 6320 2) 2 ELISP> (char-table-range cc 'ipa) #^^[nil 1 nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil 2 nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil] ELISP> (aset cc 32 1) 1 ELISP> (aset cc 33 2) 2 ELISP> (char-table-range cc 'ascii) nil ELISP> (aset cc 128 3) 3 ELISP> (char-table-range cc 'ascii) 3 ELISP> ============================================================