From: Bill Wohler <wohler@newt.com>
Cc: emacs-devel@gnu.org
Subject: Re: Setting key bindings in view-mode-hook
Date: Sun, 27 Nov 2005 11:49:59 -0800 [thread overview]
Message-ID: <16379.1133120999@olgas.newt.com> (raw)
In-Reply-To: "Richard M. Stallman"'s message of Sun, 27 Nov 2005 14:36:07 EST. <E1EgSJj-00052b-Qj@fencepost.gnu.org>
Richard M. Stallman <rms@gnu.org> wrote:
> 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.
>
> You need to bind it in the View mode keymap.
> Do C-h b and you will see what I mean.
Thanks. I was under the impression that local-set-key in a foo-mode-hook
DTRT. Does it not work in this case because view-mode is a minor mode?
Is this what you mean? It does the trick.
(define-key view-mode-map "q" 'View-kill-and-leave)
Would you recommend adding this to:
- top-level in .emacs
- view-mode-hook
- (eval-after-load "view-mode")
--
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.
next prev parent reply other threads:[~2005-11-27 19:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-27 3:26 Setting key bindings in view-mode-hook Bill Wohler
2005-11-27 16:57 ` Drew Adams
2005-11-27 19:03 ` Bill Wohler
2005-11-27 19:36 ` Richard M. Stallman
2005-11-27 19:49 ` Bill Wohler [this message]
2005-11-28 4:46 ` Richard M. Stallman
2005-12-01 0:50 ` Drew Adams
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=16379.1133120999@olgas.newt.com \
--to=wohler@newt.com \
--cc=emacs-devel@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).