all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: emacs-devel@gnu.org
Subject: Re: char-table-range
Date: Sun, 15 Feb 2004 20:12:37 -0600 (CST)	[thread overview]
Message-ID: <200402160212.i1G2Cbq04302@raven.dms.auburn.edu> (raw)
In-Reply-To: <200402160043.JAA17207@etlken.m17n.org> (message from Kenichi Handa on Mon, 16 Feb 2004 09:43:14 +0900 (JST))

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> 
============================================================

  parent reply	other threads:[~2004-02-16  2:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-16  0:43 char-table-range Kenichi Handa
2004-02-16  1:30 ` char-table-range Luc Teirlinck
2004-02-18 23:38   ` char-table-range Richard Stallman
2004-02-19  1:28     ` char-table-range Luc Teirlinck
2004-02-19 15:40       ` char-table-range Luc Teirlinck
2004-02-20 13:42       ` char-table-range Richard Stallman
2004-02-21  0:03         ` char-table-range Luc Teirlinck
     [not found]           ` <200403020247.LAA16492@etlken.m17n.org>
2004-03-03  3:39             ` char-table-range Luc Teirlinck
2004-03-03  4:50               ` char-table-range Kenichi Handa
2004-03-04 16:41                 ` char-table-range Richard Stallman
2004-03-03  4:51               ` char-table-range Kenichi Handa
2004-02-19  1:52     ` char-table-range Luc Teirlinck
2004-02-20 13:42       ` char-table-range Richard Stallman
2004-02-16  2:12 ` Luc Teirlinck [this message]
2004-02-16  4:08   ` char-table-range Kenichi Handa
2004-02-18 17:55 ` char-table-range Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200402160212.i1G2Cbq04302@raven.dms.auburn.edu \
    --to=teirllm@dms.auburn.edu \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.