* Re: Setting key bindings in view-mode-hook
[not found] <mailman.15844.1132359525.20277.help-gnu-emacs@gnu.org>
@ 2005-11-19 0:50 ` Johan Bockgård
0 siblings, 0 replies; 2+ messages in thread
From: Johan Bockgård @ 2005-11-19 0:50 UTC (permalink / raw)
Bill Wohler <wohler@newt.com> writes:
> I'd like to bind "q" in `view-mode' to `View-kill-and-leave'.
>
> I customized view-mode-hook with
>
> (lambda nil (local-set-key "q" (quote View-kill-and-leave)))
,----
| local-set-key is an interactive compiled Lisp function in `subr'.
| (local-set-key KEY COMMAND)
|
| Give KEY a local binding as COMMAND.
| [...]
| The binding goes in the current buffer's local map, which in most
| cases is shared with all other buffers in the same major mode.
`----
Define the key in `view-mode-map' instead.
> However, "C-h c q" in a buffer in view mode still shows View-quit.
View mode is a minor mode. Minor mode maps take precedence over the
local map (where "q" will have been defined).
--
Johan Bockgård
^ permalink raw reply [flat|nested] 2+ messages in thread
* Setting key bindings in view-mode-hook
@ 2005-11-18 23:26 Bill Wohler
0 siblings, 0 replies; 2+ messages in thread
From: Bill Wohler @ 2005-11-18 23:26 UTC (permalink / raw)
I'd like to bind "q" in `view-mode' to `View-kill-and-leave'.
I customized view-mode-hook with
(lambda nil (local-set-key "q" (quote View-kill-and-leave)))
However, "C-h c q" in a buffer in view mode still shows View-quit.
What gives? How come my setting isn't honored?
This is in recent CVS snapshot of Emacs 22, but a quick check reveals
that this Emacs 21 shows the same behavior.
--
Bill Wohler <wohler@newt.com> http://www.newt.com/wohler/ GnuPG ID:610BD9AD
Maintainer of comp.mail.mh FAQ and MH-E. Vote Libertarian!
If you're passed on the right, you're in the wrong lane.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-11-19 0:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.15844.1132359525.20277.help-gnu-emacs@gnu.org>
2005-11-19 0:50 ` Setting key bindings in view-mode-hook Johan Bockgård
2005-11-18 23:26 Bill Wohler
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).