From: Eli Zaretskii <eliz@gnu.org>
To: Drew Adams <drew.adams@oracle.com>
Cc: 21448@debbugs.gnu.org
Subject: bug#21448: 25.0.50; `unicode-property-table-internal' in Elisp manual
Date: Thu, 10 Sep 2015 20:12:19 +0300 [thread overview]
Message-ID: <831te65hcc.fsf@gnu.org> (raw)
In-Reply-To: <a7354d8a-de19-45f5-843c-792465d2a123@default>
> Date: Thu, 10 Sep 2015 08:27:46 -0700 (PDT)
> From: Drew Adams <drew.adams@oracle.com>
> Cc: 21448@debbugs.gnu.org
>
> I think that all that is missing wrt explaining the example is to
> say (in this node) what `uniprop-table' is here, and why and how
> it is used.
Is the text below OK?
Here's an example of defining a new category for characters that
have strong right-to-left directionality (*note Bidirectional
Display::) and using it in a special category table. To obtain
the information about the directionality of characters, the
example code uses the `bidi-class' Unicode property (*note
bidi-class: Character Properties.).
(defvar special-category-table-for-bidi
;; Make an empty category-table.
(let ((category-table (make-category-table))
;; Create a char-table which gives the 'bidi-class' Unicode
;; property for each character.
(uniprop-table (unicode-property-table-internal 'bidi-class)))
(define-category ?R "Characters of bidi-class R, AL, or RLO"
category-table)
;; Modify the category entry of each character whose 'bidi-class'
;; Unicode property is R, AL, or RLO -- these have a
;; right-to-left directionality.
(map-char-table
#'(lambda (key val)
(if (memq val '(R AL RLO))
(modify-category-entry key ?R category-table)))
uniprop-table)
category-table))
next prev parent reply other threads:[~2015-09-10 17:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <<bb3f44a8-1141-4e3c-8694-26fe89e134e5@default>
[not found] ` <<83io7j5rye.fsf@gnu.org>
2015-09-09 20:07 ` bug#21448: 25.0.50; `unicode-property-table-internal' in Elisp manual Drew Adams
2015-09-10 2:41 ` Eli Zaretskii
[not found] ` <<029d2a95-ca25-48be-bf19-2159ed753d81@default>
[not found] ` <<83fv2n573m.fsf@gnu.org>
2015-09-10 15:27 ` Drew Adams
2015-09-10 15:30 ` Drew Adams
2015-09-10 17:12 ` Eli Zaretskii [this message]
[not found] ` <<a7354d8a-de19-45f5-843c-792465d2a123@default>
[not found] ` <<831te65hcc.fsf@gnu.org>
2015-09-10 17:23 ` Drew Adams
2015-09-10 17:40 ` Eli Zaretskii
2015-09-09 14:57 Drew Adams
2015-09-09 19:10 ` Eli Zaretskii
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=831te65hcc.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=21448@debbugs.gnu.org \
--cc=drew.adams@oracle.com \
/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.