unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Skip Montanaro <skip.montanaro@gmail.com>
To: Help GNU Emacs <help-gnu-emacs@gnu.org>
Subject: Re: How to extend the ctl-x 8 map?
Date: Sun, 1 Jan 2023 14:34:39 -0600	[thread overview]
Message-ID: <CANc-5UzkF4cwxj5WvMsr2vmEVkaYWy1VZKHZ0Xo=s=on_rk2mA@mail.gmail.com> (raw)
In-Reply-To: <CANc-5Uz+NN2tTYmSVWWx5W26O8rttOSvWA0kmRsiH=EVJ5L6zg@mail.gmail.com>

>
> 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	other threads:[~2023-01-01 20:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-01 20:01 How to extend the ctl-x 8 map? Skip Montanaro
2023-01-01 20:34 ` Skip Montanaro [this message]
2023-01-02  3:24   ` 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

  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='CANc-5UzkF4cwxj5WvMsr2vmEVkaYWy1VZKHZ0Xo=s=on_rk2mA@mail.gmail.com' \
    --to=skip.montanaro@gmail.com \
    --cc=help-gnu-emacs@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.
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).