diff options
author | Kyle Meyer <kyle@kyleam.com> | 2015-02-13 23:49:37 -0500 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2015-02-13 23:49:37 -0500 |
commit | 02a57cfeb8da07af03ef5e36e71ffb3d7c3d6a44 (patch) | |
tree | 2032c8e4f721491e2dca9d172c87fe3a873cd8ee | |
parent | a69be17a62f08dd60a60e9384d37fbc0e28fe6d0 (diff) | |
download | emacs.d-02a57cfeb8da07af03ef5e36e71ffb3d7c3d6a44.tar.gz |
Rewrite gnus-catchup-and-goto-next-group
-rw-r--r-- | lisp/init-gnus.el | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/lisp/init-gnus.el b/lisp/init-gnus.el index f0b1c5e..a3b961f 100644 --- a/lisp/init-gnus.el +++ b/lisp/init-gnus.el @@ -157,27 +157,20 @@ A new buffer with the patch contents is opened in another window." (goto-char (point-max))) -;; From http://ivan.kanis.fr/ivan-gnus.el -(defun km/gnus-catchup-and-goto-next-group (&optional all) - "Mark all articles in this group as read and select the next group. -If given a prefix, mark all articles, unread as well as ticked, as -read. Don't ask to confirm." +(defun km/gnus-summary-catchup (&optional no-next) + "Mark all articles as read. +Don't ask for confirmation. With prefix argument NO-NEXT, exit +to group buffer instead of moving to next group." (interactive "P") - (save-excursion - (gnus-summary-catchup all t)) - (gnus-summary-next-group)) - -;; From http://ivan.kanis.fr/ivan-gnus.el -(defadvice gnus-summary-next-group (before km/gnus-next-group activate) - "Go to next group without selecting the first article." - (ad-set-arg 0 t)) + (let ((gnus-auto-select-next (unless no-next 'quietly))) + (gnus-summary-catchup-and-exit nil t))) (define-key gnus-summary-mode-map (kbd "C-c j") 'km/gnus-follow-last-message-link) (define-key gnus-summary-mode-map ";" 'gnus-summary-universal-argument) ;; This overrides `gnus-summary-post-news', which is also bound to ;; 'S p'. -(define-key gnus-summary-mode-map "c" 'km/gnus-catchup-and-goto-next-group) +(define-key gnus-summary-mode-map "c" 'km/gnus-summary-catchup) (define-key gnus-summary-mode-map "e" 'gnus-summary-scroll-up) (define-key gnus-summary-mode-map "j" 'ace-jump-mode) |