Created
December 5, 2010 06:43
-
-
Save bradclawsie/728882 to your computer and use it in GitHub Desktop.
biff for gnus
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; biff | |
(defvar foundnewmbox "") | |
(defun fmbiff () | |
(interactive) | |
(save-excursion | |
(set-buffer "*Group*") | |
(beginning-of-buffer) | |
(defvar foundanymbox nil) | |
(cond ((re-search-forward "INBOX.ALL" nil t) | |
(setq foundanymbox t)) | |
(t (setq foundanymbox nil))) | |
(set-buffer "*Group*") | |
(beginning-of-buffer) | |
(cond ((re-search-forward "0: INBOX.ALL" nil t) | |
(setq foundnewmbox "")) | |
(t (if foundanymbox (setq foundnewmbox "[M]") | |
(setq foundnewmbox "")))))) | |
(unless (member 'foundnewmbox global-mode-string) | |
(setq global-mode-string (append global-mode-string | |
(list 'foundnewmbox)))) | |
(add-hook 'gnus-after-getting-new-news-hook 'fmbiff) | |
(add-hook 'gnus-group-mode-hook 'fmbiff) | |
;; some shortcuts | |
(global-set-key (kbd "C-c i") 'fmbiff) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment