[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Setting key bindings in view-mode-hook
From: |
Bill Wohler |
Subject: |
Re: Setting key bindings in view-mode-hook |
Date: |
Sun, 27 Nov 2005 11:49:59 -0800 |
Richard M. Stallman <address@hidden> 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 <address@hidden> 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.