[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binding M-n in info mode.

From: Deniz Dogan
Subject: Re: Binding M-n in info mode.
Date: Fri, 02 Sep 2011 12:14:29 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.1) Gecko/20110830 Thunderbird/6.0.1

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

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?


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".

reply via email to

[Prev in Thread] Current Thread [Next in Thread]