From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: Documentation for overriding-terminal-local-map is confusing?
Date: Mon, 25 May 2020 10:08:03 -0400 [thread overview]
Message-ID: <jwvzh9wf6uq.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: m6fsgfotn4k.fsf@jsynacek-ntb.brq.redhat.com
> I currently have this piece of elisp in my init.el:
> ...
> (setf jsynacek-terminal-map (make-sparse-keymap))
> (setf overriding-terminal-local-map jsynacek-terminal-map)
> (define-key jsynacek-terminal-map (kbd "C-b") 'ido-switch-buffer)
> (define-key jsynacek-terminal-map (kbd "C-o") 'find-file)
> ...
>
> It works until I use isearch-forward, which resets
> overriding-terminal-local-map. It took me a while to figure out,
> until I noticed this in "22.9 Controlling the Active Keymaps" in the
> ELisp manual:
I guess you're victim of the fact that the ELisp manual is not written
for people editing their init.el but for people writing Elisp packages.
> 2) What is the proper way to make my own keymap that overrides
> everything? I know that the 'use-package/bind-key' package does this by
> creating a minor mode and then using emulation-mode-map-alists, but the
> variable's documentation doesn't even remotely suggest to use it that
> way.
emulation-mode-map-alists is meant for that, yes.
(think of it as emulating the UI of an editor that binds C-b to
switch-buffer, ...)
Stefan
next prev parent reply other threads:[~2020-05-25 14:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-25 8:49 Documentation for overriding-terminal-local-map is confusing? Jan Synacek
2020-05-25 14:08 ` Stefan Monnier [this message]
2020-05-25 16:38 ` Jan Synacek
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvzh9wf6uq.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.