From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: char-table-range Date: Mon, 16 Feb 2004 09:43:14 +0900 (JST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200402160043.JAA17207@etlken.m17n.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII X-Trace: sea.gmane.org 1076892418 15600 80.91.224.253 (16 Feb 2004 00:46:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 16 Feb 2004 00:46:58 +0000 (UTC) Cc: teirllm@dms.auburn.edu Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Feb 16 01:46:47 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 1AsWuN-0001dY-00 for ; Mon, 16 Feb 2004 01:46:47 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AsWuN-0000Kw-00 for ; Mon, 16 Feb 2004 01:46:47 +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 1AsWsJ-0006El-SF for emacs-devel@quimby.gnus.org; Sun, 15 Feb 2004 19:44:39 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AsWri-0005wd-GQ for emacs-devel@gnu.org; Sun, 15 Feb 2004 19:44:02 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AsWr1-0005Fd-Bx for emacs-devel@gnu.org; Sun, 15 Feb 2004 19:43:51 -0500 Original-Received: from [192.47.44.130] (helo=tsukuba.m17n.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AsWqz-0005Bs-Pv for emacs-devel@gnu.org; Sun, 15 Feb 2004 19:43:18 -0500 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2]) by tsukuba.m17n.org (8.11.6p2/3.7W-20010518204228) with ESMTP id i1G0hEd26279; Mon, 16 Feb 2004 09:43:14 +0900 (JST) (envelope-from handa@m17n.org) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) by fs.m17n.org (8.11.6p2/3.7W-20010823150639) with ESMTP id i1G0hEE02512; Mon, 16 Feb 2004 09:43:14 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id JAA17207; Mon, 16 Feb 2004 09:43:14 +0900 (JST) Original-To: emacs-devel@gnu.org User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) 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:19958 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19958 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? 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 By the way, I don't know why this function is necessary, in what situation it is intended to use this function. Currently, it is used only in cc-vars.el as below. (defconst c-emacs-features [...] ;; before and including Emacs 19.34 ((and (fboundp 'char-table-p) (char-table-p table)) (setq entry (car (char-table-range table [?a])))) but this is equivalent to (setq entry (car (aref table ?a)))) --- Ken'ichi HANDA handa@m17n.org