From 62eea1404be3b1eba394759ec472c796206721e6 Mon Sep 17 00:00:00 2001 From: yoctocell Date: Mon, 18 Jan 2021 12:06:21 +0100 Subject: Add minor modes for gnus and notmuch --- git-email-notmuch.el | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'git-email-notmuch.el') diff --git a/git-email-notmuch.el b/git-email-notmuch.el index a10789e..fc01752 100644 --- a/git-email-notmuch.el +++ b/git-email-notmuch.el @@ -5,7 +5,7 @@ ;; Author: yoctocell ;; URL: https://git.sr.ht/~yoctocell/git-email ;; Version: 0.2.0 -;; Package-Requires: ((emacs "27") (project "0.5.0") (notmuch "0.30.0")) +;; Package-Requires: ((emacs "27") (notmuch "0.30.0")) ;; Keywords: git mail ;; License: GNU General Public License >= 3 @@ -24,12 +24,27 @@ ;;; Commentary: -;; This library offers sets some variables for git-email to make it -;; work better with notmuch. +;; This library sets some variables for git-email to make it work +;; better with Notmuch. ;;; Code: (require 'git-email) +(define-minor-mode git-email-notmuch-mode + "Notmuch integration for git-email. +If called interactively, toggle the mode. A positive prefix ARG +enables the mode, any other prefix ARG disabled it. If called +from Lisp, enable the mode if ARG is omitted or nil." + :group 'git-email + :global t + :init-value nil + (if git-email-notmuch-mode + (progn + (setq git-email-compose-mail-function 'notmuch-mua-mail) + (setq git-email-send-email-function 'notmuch-mua-send-and-exit)) + (setq git-email-compose-mail-function 'message-mail) + (setq git-email-send-email-function 'message-send-and-exit))) + (provide 'git-email-notmuch) ;;; git-email-notmuch.el ends here -- cgit v1.2.3