From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Deniz Dogan Newsgroups: gmane.emacs.help Subject: Re: Binding M-n in info mode. Date: Fri, 02 Sep 2011 12:14:29 +0200 Message-ID: <4E60AC85.7050905@dogan.se> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1314958696 20883 80.91.229.12 (2 Sep 2011 10:18:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 2 Sep 2011 10:18:16 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Dani Moncayo Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Sep 02 12:18:12 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QzQpA-0003r3-MI for geh-help-gnu-emacs@m.gmane.org; Fri, 02 Sep 2011 12:18:12 +0200 Original-Received: from localhost ([::1]:38211 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QzQp9-0006A5-UB for geh-help-gnu-emacs@m.gmane.org; Fri, 02 Sep 2011 06:18:11 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:57617) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QzQp5-00069p-Dd for help-gnu-emacs@gnu.org; Fri, 02 Sep 2011 06:18:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QzQp4-0007K0-7M for help-gnu-emacs@gnu.org; Fri, 02 Sep 2011 06:18:07 -0400 Original-Received: from ch-smtp05.sth.basefarm.net ([80.76.153.6]:51947) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QzQp4-0007Jw-2E for help-gnu-emacs@gnu.org; Fri, 02 Sep 2011 06:18:06 -0400 Original-Received: from c80-216-105-155.bredband.comhem.se ([80.216.105.155]:52569 helo=[192.168.0.10]) by ch-smtp05.sth.basefarm.net with esmtp (Exim 4.76) (envelope-from ) id 1QzQmL-00033U-Ia; Fri, 02 Sep 2011 12:15:19 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.1) Gecko/20110830 Thunderbird/6.0.1 In-Reply-To: X-Originating-IP: 80.216.105.155 X-Scan-Result: No virus found in message 1QzQmL-00033U-Ia. X-Scan-Signature: ch-smtp05.sth.basefarm.net 1QzQmL-00033U-Ia 3be11c022aaa3c1fb8a1d945ec51d673 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.76.153.6 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:82116 Archived-At: On 2011-09-02 11:14, Dani Moncayo wrote: > Hi folks, > > I want to bind M-p/M-n globally to > backward-paragraph/forward-paragraph, so that I wrote this in my > .emacs: > Cool idea! ;) > (define-key global-map "\M-p" 'backward-paragraph) > (define-key global-map "\M-n" 'forward-paragraph) > > It worked right, but then I realized that info mode binds M-n to > clone-buffer. In this mode I also want to bind M-n to > forward-paragraph, so that I added this: > > (define-key Info-mode-map "\M-n" 'forward-paragraph) > > The problem is that this last remapping fails when starting my Emacs > because, at that time, the variable Info-mode-map doesn't not exits. > > What is the right way of solving this? > > TIA > You could either do it Eli's way or "my" way: (eval-after-load "info" '(define-key Info-mode-map (kbd "M-n") 'forward-paragraph)) I'm not sure which is "better".