Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
From: Emanuel Berg <embe8573@student.uu.se>
To: info-gnus-english@gnu.org
Subject: Re: overwriting c catchup shortcut in Group buffer
Date: Mon, 11 May 2015 01:00:05 +0200	[thread overview]
Message-ID: <87a8xchwcq.fsf@debian.uxu> (raw)
In-Reply-To: <mailman.2723.1431297892.904.info-gnus-english@gnu.org>

Stefan Huchler <stefan.huchler@mail.de> writes:

> he used there much progn so I did the same, no
> special choice from me.

You don't need a progn there save for if you change
the defun and would like to evaluate the whole thing
once which would include updating the hook. So it has
no meaning save for ergonomics which is a good meaning
but only if you were to change this frequently, which
of course can be the case.

>> Try without using hooks:
>>
>> (require 'gnus-group)
>> (define-key gnus-group-mode-map "h" 'backward-char)
>> ;; (define-key ...
>
> I did try it this way did not work too: I added your
> suggested blog to this mode specific file mentioned
> above and evaluated it.

It works for me, so perhaps your mode, whatever it is,
resets the keymap after that?

> (progn (require 'gnus-group) (define-key
> gnus-group-mode-map (kbd "c") 'previous-line)
> (define-key gnus-group-mode-map (kbd "t") 'next-line)
> (define-key gnus-group-mode-map (kbd "h")
> 'backward-char) (define-key gnus-group-mode-map (kbd
> "n") 'forward-char) )

You don't need the progn and you only need to require
gnus-group once. I never bothered with `kbd' but
perhaps there is some subtle advantage. But regardless
of whatever that should work, so the only reason I can
see it doesn't is you have some other goofy
stuff interfering.

-- 
underground experts united
http://user.it.uu.se/~embe8573

  parent reply	other threads:[~2015-05-10 23:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-10 19:40 Stefan Huchler
2015-05-10 22:10 ` Emanuel Berg
2015-05-10 22:44   ` Stefan Huchler
     [not found]   ` <mailman.2723.1431297892.904.info-gnus-english@gnu.org>
2015-05-10 23:00     ` Emanuel Berg [this message]
2015-05-10 23:21       ` Stefan Huchler
     [not found]       ` <mailman.2726.1431300114.904.info-gnus-english@gnu.org>
2015-05-11  0:00         ` Emanuel Berg
2015-05-23  0:41           ` Stefan Huchler

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87a8xchwcq.fsf@debian.uxu \
    --to=embe8573@student.uu.se \
    --cc=info-gnus-english@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 NNTP newsgroup(s).