From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bill Wohler Newsgroups: gmane.emacs.devel Subject: Re: Setting key bindings in view-mode-hook Date: Sun, 27 Nov 2005 11:49:59 -0800 Organization: Newt Software Message-ID: <16379.1133120999@olgas.newt.com> References: <18382.1133061987@olgas.newt.com> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1133121117 22519 80.91.229.2 (27 Nov 2005 19:51:57 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 27 Nov 2005 19:51:57 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 27 20:51:54 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EgSY0-0001u0-7U for ged-emacs-devel@m.gmane.org; Sun, 27 Nov 2005 20:50:52 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EgSXz-00031F-Gw for ged-emacs-devel@m.gmane.org; Sun, 27 Nov 2005 14:50:51 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EgSXg-0002y2-1C for emacs-devel@gnu.org; Sun, 27 Nov 2005 14:50:32 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EgSXe-0002vN-6s for emacs-devel@gnu.org; Sun, 27 Nov 2005 14:50:31 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EgSXd-0002vD-Tu for emacs-devel@gnu.org; Sun, 27 Nov 2005 14:50:30 -0500 Original-Received: from [207.69.195.63] (helo=pop-satin.atl.sa.earthlink.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EgSXc-0002xH-RI; Sun, 27 Nov 2005 14:50:28 -0500 Original-Received: from h-68-166-189-106.snvacaid.dynamic.covad.net ([68.166.189.106] helo=olgas.newt.com) by pop-satin.atl.sa.earthlink.net with esmtp (Exim 3.36 #10) id 1EgSXb-0003on-00; Sun, 27 Nov 2005 14:50:27 -0500 Original-Received: by olgas.newt.com (Postfix, from userid 1000) id 2A01316FD8; Sun, 27 Nov 2005 11:49:59 -0800 (PST) Original-Received: from olgas.newt.com (localhost [127.0.0.1]) by olgas.newt.com (Postfix) with ESMTP id 2662E16FAC; Sun, 27 Nov 2005 11:49:59 -0800 (PST) Original-To: rms@gnu.org In-Reply-To: "Richard M. Stallman"'s message of Sun, 27 Nov 2005 14:36:07 EST. X-Mailer: MH-E 7.85+cvs; nmh 1.1; GNU Emacs 22.0.50.5 X-Image-URL: http://www.newt.com/wohler/images/bill-diving.png X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:46664 Archived-At: Richard M. Stallman 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 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.