all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* view-mode keymap
@ 2012-12-31 15:04 Daimrod
  2012-12-31 16:15 ` Jambunathan K
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Daimrod @ 2012-12-31 15:04 UTC (permalink / raw)
  To: help-gnu-emacs

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))))))

-- 
Daimrod/Greg


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-01-03 15:45 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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.