help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Proper way to add bindings under C-x 8


From: Howard Melman
Subject: Proper way to add bindings under C-x 8
Date: Sat, 10 Apr 2021 12:57:15 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (darwin)

I'd like to add some things to the `C-x 8' prefix and am
curious as to the proper way to do it.  I'm interested in
adding more fractions similar to `C-x 8 1 / 2' and in adding
another prefix for my commonly used emojis as `C-x 8 e ...'

With a normal keymap I know I could do something like this:

    (global-set-key (kbd "C-x 8 1 / 5") (lambda () (interactive) (insert "⅕")))
    (global-set-key (kbd "C-x 8 e c") (lambda () (interactive) (insert "✅")))

But C-x 8 uses iso-transl-ctl-x-8-map which is some kind of
special translation map which I'm a bit vague about.  Also
there's some magic described in iso-transl.el about allowing
Alt to work as well.

The elisp manual doesn't mention C-x 8 stuff at all, and
that seems to be by design based on bug #594.  The emacs
manual mentions how to use it but not how to extend it. I
feel like customizing it should be described some place.

-- 

Howard




reply via email to

[Prev in Thread] Current Thread [Next in Thread]