From: Jambunathan K <kjambunathan@gmail.com>
To: Daimrod <daimrod@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: view-mode keymap
Date: Mon, 31 Dec 2012 21:45:57 +0530 [thread overview]
Message-ID: <8738ymnqo2.fsf@gmail.com> (raw)
In-Reply-To: <87sj6mi7p5.fsf@casa.home> (daimrod@gmail.com's message of "Mon, 31 Dec 2012 16:04:38 +0100")
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))))))
--
next prev parent reply other threads:[~2012-12-31 16:15 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 [this message]
[not found] ` <mailman.16432.1356970328.855.help-gnu-emacs@gnu.org>
2013-01-02 14:22 ` Daimrod
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8738ymnqo2.fsf@gmail.com \
--to=kjambunathan@gmail.com \
--cc=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.
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.