From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xue Fuqiao Newsgroups: gmane.emacs.help Subject: A question about category name in ELisp Date: Sat, 5 Oct 2013 18:43:27 +0800 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1380969825 4261 80.91.229.3 (5 Oct 2013 10:43:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Oct 2013 10:43:45 +0000 (UTC) To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Oct 05 12:43:48 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VSPKs-0008Qx-95 for geh-help-gnu-emacs@m.gmane.org; Sat, 05 Oct 2013 12:43:46 +0200 Original-Received: from localhost ([::1]:51432 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VSPKr-0005F3-FP for geh-help-gnu-emacs@m.gmane.org; Sat, 05 Oct 2013 06:43:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42957) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VSPKf-0005El-1L for help-gnu-emacs@gnu.org; Sat, 05 Oct 2013 06:43:37 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VSPKa-0003UQ-Bu for help-gnu-emacs@gnu.org; Sat, 05 Oct 2013 06:43:32 -0400 Original-Received: from mail-ie0-x235.google.com ([2607:f8b0:4001:c03::235]:62055) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VSPKa-0003UL-6O for help-gnu-emacs@gnu.org; Sat, 05 Oct 2013 06:43:28 -0400 Original-Received: by mail-ie0-f181.google.com with SMTP id tp5so10984513ieb.26 for ; Sat, 05 Oct 2013 03:43:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=JdACPoBVzpdAv05kelMcm1LJQp9K9dHFN+85JvRqIcM=; b=ytxxih5n3fNNqxQJASvtUZ9sJcsTrWsu85xUJEmxybBF94dneWbiyobYl0/sNlecOH rH3ecnHBxOu4PicHwzDg0JuTP6dMvoQ9dJst9uwets0Bkr0If77rtArTjcSCbCOleBRI 6zUhujWtOMRVvgMOY9JojvCGky577YvXXpvTxlIkcYxssihlPKWhTxJdeBJV8iIZB+MK PCvWd9+G9CsRGNczFG/Nd+dr49e2OPSkJkMpD2skGEBL5TLIiThqaupphFwCXlT4z/5t XBMtiznyu8jY3qRYwVBNei7EIW2ghFeXBv5Eb4xipSujjB22e2qgPbs1QPuD33gMcwPQ ZqNA== X-Received: by 10.50.85.114 with SMTP id g18mr10012166igz.15.1380969807326; Sat, 05 Oct 2013 03:43:27 -0700 (PDT) Original-Received: by 10.42.133.72 with HTTP; Sat, 5 Oct 2013 03:43:27 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c03::235 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:93855 Archived-At: Hi, I have a question about category and category table. In (info "(elisp) Categories"): Each category has a name, which is an ASCII printing character in the range =E2=80=98 =E2=80=99 to =E2=80=98~=E2=80=99. You specify the na= me of a category when you define it with =E2=80=98define-category=E2=80=99. The category table is actually a char-table (*note Char-Tables::). The element of the category table at index C is a "category set"=E2=80=94= a bool-vector=E2=80=94that indicates which categories character C belongs t= o. In this category set, if the element at index CAT is =E2=80=98t=E2=80=99,= that means category CAT is a member of the set, and that character C belongs to category CAT. >From the second paragraph, my impression about a category table is something like this: | | a | - | . | " | |-----+-----+-----+-----+-----| | bv1 | bv2 | bv3 | bv4 | bv5 | (The first row contains the indices of the char-table (i.e., the "index C" above), and the second row contains the elements at index C1, C2, ... (i.e., it's a category set, which is a bool-vector.)) As with all arrays, bool-vector indices start from 0, so CAT should be an integer. But according to my understanding, CAT is a category name, which should be an ASCII printing character (instead of just an integer, from the first paragraph). Why? Am I missing something? --=20 Best regards, Xue Fuqiao. http://www.gnu.org/software/emacs/