From: Daimrod <daimrod@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: view-mode keymap
Date: Wed, 02 Jan 2013 15:22:25 +0100 [thread overview]
Message-ID: <87sj6j8y1q.fsf@casa.home> (raw)
In-Reply-To: mailman.16432.1356970328.855.help-gnu-emacs@gnu.org
Jambunathan K <kjambunathan@gmail.com> writes:
> I think, `make-composed-keymap' can help here.
>
>
>> I like `view-mode' but it conflicts with others minor mode map (paredit
>> in my case).
>>
>> I would like to know if there is a better way to make a keymap that
>> takes precedence over the others than manipulating
>> `minor-mode-map-alist'.
>>
>> Here is my current implementation:
>>
>> (add-hook 'view-mode-hook
>> (lambda ()
>> ;; Makes sure `view-mode-map' is the first minor mode map
>> ;; available in `minor-mode-map-alist', because in case of
>> ;; conflicting bindings, the first one is used.
>> (unless (eq 'view-mode (caar minor-mode-map-alist))
>> (setf minor-mode-map-alist
>> (cons (cons 'view-mode view-mode-map)
>> (cl-remove 'view-mode minor-mode-map-alist
>> :key #'car))))))
I've looked at it but I don't see how it can help. I don't want to
create a new keymap, I want `view-mode-map' to take priority over other
keymaps.
I've looked at the documentation and it seems that changing the order in
`minor-mode-map-alist' is the only way to manage priorities between
keymap, because they shouldn't conflict in there first place.
--
Daimrod/Greg
next prev parent reply other threads:[~2013-01-02 14:22 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-31 15:04 view-mode keymap Daimrod
2012-12-31 16:15 ` Jambunathan K
[not found] ` <mailman.16432.1356970328.855.help-gnu-emacs@gnu.org>
2013-01-02 14:22 ` Daimrod [this message]
2013-01-03 6:28 ` Jambunathan K
[not found] ` <mailman.16584.1357194301.855.help-gnu-emacs@gnu.org>
2013-01-03 11:10 ` Daimrod
2013-01-03 12:21 ` Daimrod
2013-01-03 13:10 ` Eric Abrahamsen
[not found] ` <mailman.16601.1357218351.855.help-gnu-emacs@gnu.org>
2013-01-03 15:45 ` Daimrod
2013-01-02 16:43 ` Michael Heerdegen
[not found] ` <mailman.16535.1357144973.855.help-gnu-emacs@gnu.org>
2013-01-02 17:08 ` Daimrod
2013-01-03 14:43 ` William Xu
[not found] ` <mailman.16604.1357224259.855.help-gnu-emacs@gnu.org>
2013-01-03 15:44 ` Daimrod
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=87sj6j8y1q.fsf@casa.home \
--to=daimrod@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).