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: Tue, 2 Mar 2004 21:39:19 -0600 (CST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200403030339.i233dJs02566@raven.dms.auburn.edu> References: <200402160043.JAA17207@etlken.m17n.org> <200402160130.i1G1UKG04241@raven.dms.auburn.edu> <200402190128.i1J1StG21175@raven.dms.auburn.edu> <200402210003.i1L03Bo05498@raven.dms.auburn.edu> <200403020247.LAA16492@etlken.m17n.org> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1078364201 13089 80.91.224.253 (4 Mar 2004 01:36:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 4 Mar 2004 01:36:41 +0000 (UTC) Cc: handa@m17n.org, rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Mar 04 02:36:30 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 1Ayhmo-0004xD-00 for ; Thu, 04 Mar 2004 02:36:30 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1Ayhmo-0007TQ-00 for ; Thu, 04 Mar 2004 02:36:30 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1AyhmQ-0008A2-TI for emacs-devel@quimby.gnus.org; Wed, 03 Mar 2004 20:36:06 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1AyNFu-0006IO-EJ for emacs-devel@gnu.org; Tue, 02 Mar 2004 22:41:10 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1AyNFF-0005pV-F5 for emacs-devel@gnu.org; Tue, 02 Mar 2004 22:41:00 -0500 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.30) id 1AyNFE-0005ln-Iw; Tue, 02 Mar 2004 22:40:28 -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 i233eIKt012075; Tue, 2 Mar 2004 21:40:19 -0600 (CST) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.6+Sun/8.11.6) id i233dJs02566; Tue, 2 Mar 2004 21:39:19 -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: <200403020247.LAA16492@etlken.m17n.org> (message from Kenichi Handa on Tue, 2 Mar 2004 11:47:19 +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:20235 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:20235 Ken 'ichi Handa wrote: (set-char-table-default TABLE IDX VAL) (1) If IDX is a symbol `ascii', set the default value for all characters to VAL. (2) If IDX is GENERIC-CHAR, set the value for characters in GENERIC-CHAR to nil, and set the default value for them to VAL. (3) If IDX is an individual character, set IDX to a generic character that represents the smallest group of characters containing IDX, and perform (2). I think (1) is a misfeature. The default value for all characters should be set by specifying IDX nil. (3) is also very questionable. I think we don't need it. I do not know whether (2) is intended as description of the current behavior of set-char-table-default or as a proposed new behavior. As a description of the current behavior it is not completely accurate. Indeed, aset and set-char-table-range both behave exactly as described in (2) for a generic character, but currently, set-char-table-default for a generic character just sets the default value to VAL, _without_ first setting the value for characters in GENERIC-CHAR to nil (as aset and set-char-table-range indeed both do). See the ielm run below. ===File ~/chartable-stuff=================================== *** Welcome to IELM *** Type (describe-mode) for help. ELISP> (setq cc (make-char-table 'translation-table)) ELISP> (aset cc (make-char 'ipa 48) 2) 2 ELISP> (aset cc (make-char 'ipa) 1) 1 ELISP> (aref cc (make-char 'ipa 48)) 1 ELISP> (aset cc (make-char 'ipa 48) 2) 2 ELISP> (set-char-table-range cc (make-char 'ipa) 1) 1 ELISP> (aref cc (make-char 'ipa 48)) 1 ELISP> (aset cc (make-char 'ipa 48) 2) 2 ELISP> (set-char-table-default cc (make-char 'ipa) 1) 1 ELISP> (aref cc (make-char 'ipa 48)) 2 ELISP> ============================================================