From: "Drew Adams" <drew.adams@oracle.com>
To: <emacs-pretest-bug@gnu.org>
Subject: bug#3568: 23.0.94; no doc for character composition
Date: Sun, 14 Jun 2009 16:17:35 -0700 [thread overview]
Message-ID: <F4B48B37B4AA4349B9E124A3901A3637@us.oracle.com> (raw)
I can find no doc at all regarding character composition, beyond the
cursory explanation given in the Emacs manual, node Input Methods.
In particular, there is nothing in the Elisp manual about it. No
documentation of functions such as `compose-region' and
`compose-chars'.
And there is no usage commentary in `composite.el'.
How does one compose characters using Emacs Lisp? If characters have
been composed, how do you decompose them? Are there any caveats to be
aware of? Users will have such questions.
For example, this snippet is commonly used here and there to display the word
`lambda' as the Greek character:
(font-lock-add-keywords
mode `(("\\<lambda\\>"
(0 (progn (compose-region (match-beginning 0) (match-end 0)
,(make-char 'greek-iso8859-7 107))
nil)))))
But removing that keyword entry from font-lock-keywords, unfontifying, then
refontifying is not sufficient to display `lambda' as a word again. What needs
to be done, to restore the normal display of the word `lambda'? This kind of
information is missing.
Perusing `composite.el', I see that this will do the job:
(font-lock-remove-keywords
nil `(("\\<lambda\\>"
(0 (progn (compose-region (match-beginning 0) (match-end 0)
,(make-char 'greek-iso8859-7 107))
nil)))))
(save-excursion
(goto-char (point-min))
(while (re-search-forward "\\<lambda\\>" nil t)
(decompose-region (match-beginning 0) (match-end 0))))
But it would be helpful to have a little doc in the Elisp manual
explaining how to use character composition. This feature deserves some doc.
Compare, for example, the doc for font-locking with that for character
composition. Even if these features are not of the same scale, you can see a
qualitative difference in the doc support.
Look at the commentary in file font-lock.el - a section explaining clearly "How
Font Lock mode fontifies", and another section explaining "What is fontification
for?". Plenty of Info doc, in both the Emacs and Elisp manuals.
Character composition should be better documented. I can understand if the
author is not comfortable providing lots of English doc, but someone who
understands character composition should do so. Think in terms of how Emacs
users and Emacs-Lisp users might make use of this feature, then write that up
for those of us who are ignorant.
Thanks.
In GNU Emacs 23.0.94.1 (i386-mingw-nt5.1.2600)
of 2009-05-24 on SOFT-MJASON
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'
next reply other threads:[~2009-06-14 23:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-14 23:17 Drew Adams [this message]
2016-04-27 19:23 ` bug#3568: 23.0.94; no doc for character composition Lars Ingebrigtsen
2016-04-27 19:42 ` Drew Adams
2016-04-27 20:11 ` Eli Zaretskii
[not found] ` <<623906f5-d8d6-416b-b435-7f3b0f44944a@default>
[not found] ` <<83mvoeyfpx.fsf@gnu.org>
2016-04-27 21:18 ` Drew Adams
2016-04-28 5:07 ` 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=F4B48B37B4AA4349B9E124A3901A3637@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=3568@emacsbugs.donarmstrong.com \
--cc=emacs-pretest-bug@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.