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

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

Re: How to extend the ctl-x 8 map?


From: Skip Montanaro
Subject: Re: How to extend the ctl-x 8 map?
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:

(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


reply via email to

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