From: Deniz Dogan <deniz@dogan.se>
To: Dani Moncayo <dmoncayo@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Binding M-n in info mode.
Date: Fri, 02 Sep 2011 12:14:29 +0200 [thread overview]
Message-ID: <4E60AC85.7050905@dogan.se> (raw)
In-Reply-To: <CAH8Pv0hjOZgUuUa0LOnycErd1Rd=frMv2FxwEVq+26PJd+vShg@mail.gmail.com>
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".
next prev parent reply other threads:[~2011-09-02 10:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-02 9:14 Binding M-n in info mode Dani Moncayo
2011-09-02 9:25 ` Eli Zaretskii
2011-09-02 9:31 ` Dani Moncayo
2011-09-02 10:14 ` Deniz Dogan [this message]
2011-09-02 11:14 ` Thien-Thi Nguyen
2011-09-02 12:17 ` Dani Moncayo
2011-09-02 16:07 ` Vijay Lakshminarayanan
2011-09-02 16:17 ` Deniz Dogan
2011-09-02 20:02 ` Dani Moncayo
2011-09-02 19:59 ` Dani Moncayo
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=4E60AC85.7050905@dogan.se \
--to=deniz@dogan.se \
--cc=dmoncayo@gmail.com \
--cc=help-gnu-emacs@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.
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).