unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to extend the ctl-x 8 map?
@ 2023-01-01 20:01 Skip Montanaro
  2023-01-01 20:34 ` Skip Montanaro
  0 siblings, 1 reply; 3+ messages in thread
From: Skip Montanaro @ 2023-01-01 20:01 UTC (permalink / raw)
  To: Help GNU Emacs

I found myself at a loss to type Ł characters in an email today. I realize
I can type CTL-X 8 RET and enter the Unicode phrase corresponding to that
letter, but would like something a bit less verbose, like CTL-X 8 / L. I
see an iso-spanish function in iso-cvt.el and corresponding translation
table, but don't understand how it's involved (if at all) with the CTL-X 8
keymap stuff. Does someone have an example of extending the reach of that
keymap?

Thanks,

Skip Montanaro


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to extend the ctl-x 8 map?
  2023-01-01 20:01 How to extend the ctl-x 8 map? Skip Montanaro
@ 2023-01-01 20:34 ` Skip Montanaro
  2023-01-02  3:24   ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Skip Montanaro @ 2023-01-01 20:34 UTC (permalink / raw)
  To: Help GNU Emacs

>
> I found myself at a loss to type Ł characters in an email today. I realize
> I can type CTL-X 8 RET and enter the Unicode phrase corresponding to that
> letter (which I didn't know), but would like something a bit less
> verbose, like CTL-X 8 / L. I see an iso-spanish function in iso-cvt.el and
> corresponding translation table, but don't understand how it's involved (if
> at all) with the CTL-X 8 keymap stuff. Does someone have an example of
> extending the reach of that keymap?
>

After a bit more reading, I think I figured it out. iso-cvt.el isn't
involved at all, but iso-transl.el is. I came up with the following in my
init.el file:

(defvar polish-language
  '("Polish"
     (",A"  . [?Ą])
     (",a"  . [?ą])
     ("'C"  . [?Ć])
     ("'c"  . [?ć])
     (",E"  . [?Ę])
     (",e"  . [?ę])
     ("/L"  . [?Ł])
     ("/l"  . [?ł])
     ("'N"  . [?Ń])
     ("'n"  . [?ń])
     ("'O"  . [?Ó])
     ("'o"  . [?ó])
     ("'S"  . [?Ś])
     ("'s"  . [?ś])
     ("'Z"  . [?Ź])
     ("'z"  . [?ź])))

(require 'iso-transl)

(add-to-list 'iso-transl-language-alist polish-language)

The only pairs I didn't add were ".Z" and ".z" because "C-x 8 ." doesn't
lead to a keymap. I suppose I could cheat and use ",Z" and ",z", but I let
it go for now.

Skip


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to extend the ctl-x 8 map?
  2023-01-01 20:34 ` Skip Montanaro
@ 2023-01-02  3:24   ` Eli Zaretskii
  0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2023-01-02  3:24 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Skip Montanaro <skip.montanaro@gmail.com>
> Date: Sun, 1 Jan 2023 14:34:39 -0600
> 
> > I found myself at a loss to type Ł characters in an email today. I realize
> > I can type CTL-X 8 RET and enter the Unicode phrase corresponding to that
> > letter (which I didn't know), but would like something a bit less
> > verbose, like CTL-X 8 / L. I see an iso-spanish function in iso-cvt.el and
> > corresponding translation table, but don't understand how it's involved (if
> > at all) with the CTL-X 8 keymap stuff. Does someone have an example of
> > extending the reach of that keymap?
> >
> 
> After a bit more reading, I think I figured it out. iso-cvt.el isn't
> involved at all, but iso-transl.el is. I came up with the following in my
> init.el file:

I'm not sure I understand why you need this in your init.el.  I can
type "C-x 8 / l" and get ł without any customization.

What version of Emacs are you using?



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-01-02  3:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-01 20:01 How to extend the ctl-x 8 map? Skip Montanaro
2023-01-01 20:34 ` Skip Montanaro
2023-01-02  3:24   ` Eli Zaretskii

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).