[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
article-mode and 'gnus-summary-put-mark-as-expirable-next
From: |
Giorgos Keramidas |
Subject: |
article-mode and 'gnus-summary-put-mark-as-expirable-next |
Date: |
Sun, 13 Apr 2008 05:55:57 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) |
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
Changing the first `local-set-key' to
(local-set-key "e" "MMen")
works fine, though.
I can definitely keep "MMen" in my local keymap, but I was wondering why
`gnus-summary-put-mark-as-expirable-next' doesn't work where "MMen" does.
The definition of `gnus-summary-put-mark-as-expirable-next' seems to be
produced by `gnus-summary-make-marking-command-1', and I can see where
the warning about summary mode comes from, near the start of the generic
`gnus-summary-generic-mark' functio:
(defun gnus-summary-generic-mark (n mark move unread)
"Mark N articles with MARK."
(unless (eq major-mode 'gnus-summary-mode)
(error "This command can only be used in the summary buffer"))
...)
If calling `gnus-summary-put-mark-as-expirable-next' is not really
possible from a hook in article-mode, what would be a good way of
writing a hook that can work in both summary-mode and article-mode?
Thanks in advance for any help,
Giorgos
- article-mode and 'gnus-summary-put-mark-as-expirable-next,
Giorgos Keramidas <=