[Top][All Lists]

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

Re: overwriting c catchup shortcut in Group buffer

From: Emanuel Berg
Subject: Re: overwriting c catchup shortcut in Group buffer
Date: Mon, 11 May 2015 01:00:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Stefan Huchler <> 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

reply via email to

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