Guest User

Untitled

a guest
Jul 16th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. ;; biff
  2. (defvar foundnewmbox "")
  3. (defun fmbiff ()
  4. (interactive)
  5. (save-excursion
  6. (set-buffer "*Group*")
  7. (beginning-of-buffer)
  8. (defvar foundanymbox nil)
  9. (cond ((re-search-forward "INBOX.ALL" nil t)
  10. (setq foundanymbox t))
  11. (t (setq foundanymbox nil)))
  12. (set-buffer "*Group*")
  13. (beginning-of-buffer)
  14. (cond ((re-search-forward "0: INBOX.ALL" nil t)
  15. (setq foundnewmbox ""))
  16. (t (if foundanymbox (setq foundnewmbox "[M]")
  17. (setq foundnewmbox ""))))))
  18.  
  19. (unless (member 'foundnewmbox global-mode-string)
  20. (setq global-mode-string (append global-mode-string
  21. (list 'foundnewmbox))))
  22.  
  23. (add-hook 'gnus-after-getting-new-news-hook 'fmbiff)
  24. (add-hook 'gnus-group-mode-hook 'fmbiff)
  25.  
  26. ;; some shortcuts
  27. (global-set-key (kbd "C-c i") 'fmbiff)
Add Comment
Please, Sign In to add comment