aboutsummaryrefslogtreecommitdiff
path: root/git-email-gnus.el
blob: 8b33b517a49fc315b9e8d7f6243207cd6feda190 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
;;; git-email-gnus.el --- Gnus integration for git-email -*- lexical-binding: t; -*-

;; Copyright (C) 2021  all contributors <~yoctocell/git-email-deve@lists.sr.ht>

;; Author: Xinglu Chen <public@yoctocell.xyz>
;; URL: https://git.sr.ht/~yoctocell/git-email
;; Version: 0.2.0
;; Package-Requires: ((emacs "27"))
;; Keywords: git mail
;; License: GNU General Public License >= 3

;; This program 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.

;; This program 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 this program.  If not, see <https://www.gnu.org/licenses/>.

;;; Commentary:

;; This library sets some variables for git-email to make it work
;; better with Gnus.

;;; Code:

(require 'git-email)
(require 'gnus-msg)

;;;###autoload
(define-minor-mode git-email-gnus-mode
  "Gnus integration for git-email.
If called interactively, toggle the mode.  A positive prefix ARG
enables the mode, any other prefix ARG disables 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-gnus-mode
      (setq git-email-compose-email-function 'gnus-msg-mail)
    (setq git-email-compose-email-function 'message-mail)))

(provide 'git-email-gnus)
;;; git-email-gnus.el ends here