From: Robert Pluim <rpluim@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org, Howard Melman <hmelman@gmail.com>
Subject: Re: Proper way to add bindings under C-x 8
Date: Thu, 02 Dec 2021 11:26:50 +0100 [thread overview]
Message-ID: <87pmqfe1zp.fsf@gmail.com> (raw)
In-Reply-To: <lyr1ax8rp6.fsf@Lumet.home> (Howard Melman's message of "Tue, 30 Nov 2021 12:43:33 -0500")
>>>>> On Tue, 30 Nov 2021 12:43:33 -0500, Howard Melman <hmelman@gmail.com> said:
>> I am? I donʼt feel like I have any grasp of it at all.
Howard> I'd like to know. The work-around posted doesn't bind
Howard> things in all the places iso-tranl-define-keys does (only
Howard> under C-x 8) and I find that code a bit opaque.
So the elisp manual says the following in "(elisp) Translation Keymaps"
(see especially that last sentence)
Translation keymaps have the same structure as other keymaps, but are
used differently: they specify translations to make while reading key
sequences, rather than bindings for complete key sequences. As each key
sequence is read, it is checked against each translation keymap. If one
of the translation keymaps binds K to a vector V, then whenever K
appears as a sub-sequence _anywhere_ in a key sequence, that
sub-sequence is replaced with the events in V.
"event_s_ in V."
Later in the same node:
You can use ‘input-decode-map’, ‘local-function-key-map’, and
‘key-translation-map’ for more than simple aliases, by using a function,
instead of a key sequence, as the translation of a key. Then this
function is called to compute the translation of that key.
"instead of a key _sequence_"
So Iʼd expect the following
(define-key iso-transl-ctl-x-8-map "ef" (vector #x2660 #x2660))
to allow me to use C-x 8 e f to insert U+2660 twice, but it only
inserts it once. What am I missing?
(emacs-master, although I doubt that matters)
Robert
--
next prev parent reply other threads:[~2021-12-02 10:26 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-10 16:57 Proper way to add bindings under C-x 8 Howard Melman
2021-04-10 17:41 ` Eli Zaretskii
2021-04-10 21:35 ` Howard Melman
2021-04-11 6:45 ` Eli Zaretskii
2021-11-29 16:21 ` Howard Melman
2021-11-30 11:34 ` Michael Heerdegen
2021-11-30 12:39 ` Robert Pluim
2021-11-30 13:07 ` Michael Heerdegen
2021-11-30 13:39 ` Robert Pluim
2021-11-30 16:32 ` Howard Melman
2021-11-30 16:49 ` Robert Pluim
2021-11-30 17:25 ` Eli Zaretskii
2021-11-30 17:39 ` Robert Pluim
2021-11-30 17:43 ` Howard Melman
2021-12-02 10:26 ` Robert Pluim [this message]
2021-12-02 14:44 ` Michael Heerdegen
2021-12-02 15:03 ` Robert Pluim
2021-12-02 15:27 ` Michael Heerdegen
2021-12-02 15:56 ` Robert Pluim
2021-12-02 16:18 ` Michael Heerdegen
2021-12-02 16:48 ` Robert Pluim
2021-11-30 16:43 ` Robert Pluim
2021-11-30 17:29 ` Howard Melman
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pmqfe1zp.fsf@gmail.com \
--to=rpluim@gmail.com \
--cc=eliz@gnu.org \
--cc=help-gnu-emacs@gnu.org \
--cc=hmelman@gmail.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).