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: set-char-table-range with charset arguments Date: Wed, 10 Dec 2003 20:13:54 -0600 (CST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200312110213.hBB2DsO28953@raven.dms.auburn.edu> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1071109389 4488 80.91.224.253 (11 Dec 2003 02:23:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 11 Dec 2003 02:23:09 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Dec 11 03:23:07 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AUGTr-0004UI-00 for ; Thu, 11 Dec 2003 03:23:07 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1AUGTr-00064F-00 for ; Thu, 11 Dec 2003 03:23:07 +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 1AUHPg-0008Lx-1Q for emacs-devel@quimby.gnus.org; Wed, 10 Dec 2003 22:22:52 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AUHPO-0008KG-JT for emacs-devel@gnu.org; Wed, 10 Dec 2003 22:22:34 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AUHOr-00087X-Dm for emacs-devel@gnu.org; Wed, 10 Dec 2003 22:22:32 -0500 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AUHOq-00086Z-GW for emacs-devel@gnu.org; Wed, 10 Dec 2003 22:22:00 -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 hBB2KjKk027223 for ; Wed, 10 Dec 2003 20:20:45 -0600 (CST) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.6+Sun/8.11.6) id hBB2DsO28953; Wed, 10 Dec 2003 20:13:54 -0600 (CST) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: emacs-devel@gnu.org 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:18629 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:18629 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> ============================================================