diff --git a/mu4e/Makefile.am b/mu4e/Makefile.am index ef40768e..b82e4aea 100644 --- a/mu4e/Makefile.am +++ b/mu4e/Makefile.am @@ -27,6 +27,7 @@ dist_lisp_LISP= \ mu4e-about.el \ mu4e-actions.el \ mu4e-compose.el \ + mu4e-contrib.el \ mu4e-draft.el \ mu4e-headers.el \ mu4e-lists.el \ diff --git a/mu4e/mu4e-contrib.el b/mu4e/mu4e-contrib.el new file mode 100644 index 00000000..7de35ec8 --- /dev/null +++ b/mu4e/mu4e-contrib.el @@ -0,0 +1,41 @@ +;;; mu4e-contrib.el -- part of mu4e, the mu mail user agent +;; +;; Copyright (C) 2013 Dirk-Jan C. Binnema + +;; This file is not part of GNU Emacs. +;; +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; Some user-contributed functions for mu4e + +;; Contributed by sabof + +(defun mu4e-headers-mark-all-unread-read () + "Put a ! \(read) mark on all visible unread messages" + (interactive) + (mu4e-headers-mark-for-each-if + (cons 'read nil) + (lambda (msg param) + (memq 'unread (mu4e-msg-field msg :flags))))) + +(defun mu4e-headers-flag-all-read () + "Flag all visible messages as \"read\"" + (interactive) + (mu4e-headers-mark-all-unread-read) + (mu4e-mark-execute-all t)) + + +(provide 'mu4e-contrib)