[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21448: 25.0.50; `unicode-property-table-internal' in Elisp manual
From: |
Eli Zaretskii |
Subject: |
bug#21448: 25.0.50; `unicode-property-table-internal' in Elisp manual |
Date: |
Thu, 10 Sep 2015 20:12:19 +0300 |
> 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))
- bug#21448: 25.0.50; `unicode-property-table-internal' in Elisp manual, Drew Adams, 2015/09/09
- bug#21448: 25.0.50; `unicode-property-table-internal' in Elisp manual, Eli Zaretskii, 2015/09/09
- bug#21448: 25.0.50; `unicode-property-table-internal' in Elisp manual, Drew Adams, 2015/09/09
- bug#21448: 25.0.50; `unicode-property-table-internal' in Elisp manual, Eli Zaretskii, 2015/09/09
- bug#21448: 25.0.50; `unicode-property-table-internal' in Elisp manual, Drew Adams, 2015/09/10
- bug#21448: 25.0.50; `unicode-property-table-internal' in Elisp manual, Drew Adams, 2015/09/10
- bug#21448: 25.0.50; `unicode-property-table-internal' in Elisp manual,
Eli Zaretskii <=
- bug#21448: 25.0.50; `unicode-property-table-internal' in Elisp manual, Drew Adams, 2015/09/10
- bug#21448: 25.0.50; `unicode-property-table-internal' in Elisp manual, Eli Zaretskii, 2015/09/10