[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: article-mode and 'gnus-summary-put-mark-as-expirable-next
From: |
Giorgos Keramidas |
Subject: |
Re: article-mode and 'gnus-summary-put-mark-as-expirable-next |
Date: |
Sun, 13 Apr 2008 06:15:13 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) |
On Sun, 13 Apr 2008 05:55:57 +0300, Giorgos Keramidas
<keramida@ceid.upatras.gr> wrote:
> Hi everyone,
>
> I tried swapping the `e' and `E' keys in summary and article mode
> today. The main reason is I find it harder to type `Shift-e' all the
> time on my laptop, and I expire articles far more often than I edit
> their text.
>
> My first attempt was:
>
> (add-hook 'gnus-summary-mode-hook 'keramida-alter-summary-map)
> (add-hook 'gnus-article-prepare-hook 'keramida-alter-summary-map)
> (defun keramida-alter-summary-map ()
> (local-set-key "e" 'gnus-summary-put-mark-as-expirable-next)
> (local-set-key "E" 'gnus-summary-edit-article))
>
> but then I found out that 'e' doesn't work in an *Article* buffer,
> producing the message:
>
> This command can only be used in the summary buffer
Got it, sorry for posting too fast. Making gnus-summary-buffer the
current buffer works, but `gnus-summary-put-mark-as-expirable-next'
is an interactive function. The following version works fine:
(add-hook 'gnus-summary-mode-hook 'keramida-alter-summary-map)
(add-hook 'gnus-article-prepare-hook 'keramida-alter-summary-map)
(defun keramida-alter-summary-map ()
(local-set-key "e"
(lambda (n)
(interactive "p")
(gnus-summary-put-mark-as-expirable-next n)))
(local-set-key "E" 'gnus-summary-edit-article))
Does this seem a reasonable way of writing the hook? I've never used an
`interactive' lambda before, so I'm not sure if it's considered bad style.
- Giorgos