(defun dsg-gnus-mh-make-seen (&optional doall) (if (eq (car (gnus-group-method (if (eq major-mode 'gnus-group-mode) (gnus-group-group-name) gnus-newsgroup-name))) 'nnml) (let ((mark-cmd (concat mh-progs "/mark")) (fldr-cmd (concat mh-progs "/folder")) (fldr (if (eq major-mode 'gnus-group-mode) (substring (gnus-group-group-name) 5) (substring nnml-current-directory (length mh-user-path))))) (call-process fldr-cmd nil nil nil "-push" (concat "+" fldr)) (cond ((eq doall 'all) (call-process mark-cmd nil nil nil "-sequence" "unseen" "-delete" "all")) ((integerp doall) (call-process mark-cmd nil nil nil "-sequence" "unseen" "-delete" (concat "1-" (int-to-string doall)))) (t (call-process mark-cmd nil nil nil "-sequence" "unseen" "-delete" (int-to-string (gnus-summary-article-number))))) (call-process fldr-cmd nil nil nil "-pop")))) (defadvice gnus-group-catchup (before make-seen activate) "Mark all messages as seen in MH." (dsg-gnus-mh-make-seen 'all)) (defadvice gnus-group-catchup-current (before make-seen activate) "Mark all messages as seen in MH." (dsg-gnus-mh-make-seen 'all)) (defadvice gnus-group-catchup-current-all (before make-seen activate) "Mark all messages as seen in MH." (dsg-gnus-mh-make-seen 'all)) (defadvice gnus-summary-catchup (before make-seen activate) "Mark all messages as seen in MH." (dsg-gnus-mh-make-seen 'all)) (defadvice gnus-summary-catchup-all (before make-seen activate) "Mark all messages as seen in MH." (dsg-gnus-mh-make-seen 'all)) (defadvice gnus-summary-catchup-all-and-exit (before make-seen activate) "Mark all messages as seen in MH." (dsg-gnus-mh-make-seen 'all)) (defadvice gnus-summary-catchup-and-exit (before make-seen activate) "Mark all messages as seen in MH." (dsg-gnus-mh-make-seen 'all)) (defadvice gnus-summary-catchup-and-goto-next-group (before make-seen activate) "Mark all messages as seen in MH." (dsg-gnus-mh-make-seen 'all)) (defadvice gnus-summary-catchup-to-here (before make-seen activate) "Mark all messages as seen in MH." (dsg-gnus-mh-make-seen (gnus-summary-article-number))) (defadvice gnus-summary-mark-as-expirable (before make-seen activate) "Mark the message as seen in MH." (dsg-gnus-mh-make-seen))