* Makefile.am (EXTRA_DIST): Add liece.xbm and liece.xpm.
[elisp/liece.git] / lisp / liece-mail.el
1 ;;; liece-mail.el --- Message composing and sending utility.
2 ;; Copyright (C) 1999 Daiki Ueno
3
4 ;; Author: Daiki Ueno <ueno@unixuser.org>
5 ;; Created: 1998-09-28
6 ;; Revised: 1998-12-29
7 ;; Keywords: IRC, liece, Gnus
8
9 ;; This file is part of Liece.
10
11 ;; This program is free software; you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 2, or (at your option)
14 ;; any later version.
15
16 ;; This program is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 ;; GNU General Public License for more details.
20
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA.
25
26
27 ;;; Commentary:
28 ;; 
29
30 ;;; Code:
31
32 (require 'liece-version)
33
34 (defgroup liece-mail nil
35   "Compose and send mail in IRC buffer"
36   :group 'liece-vars)
37
38 (defcustom liece-mail-draft-buffer " *mail*"
39   "Generic draft buffer."
40   :group 'liece-mail
41   :type 'string)
42
43 (defcustom liece-maintainer-address
44   "liece@unixuser.org (Liece developers)"
45   "The mail address of the Liece maintainers."
46   :group 'liece-mail
47   :type 'string)
48
49 (defun liece-command-mail-compose (nick)
50   (interactive
51    (let ((completion-ignore-case t))
52      (list
53       (liece-minibuffer-completing-read
54        "To whom: " liece-nick-alist nil nil nil nil liece-current-chat-partner))))
55   (let ((composefunc (get mail-user-agent 'composefunc)) (to nick)
56         (user-agent (liece-version)) uah)
57     (if (setq uah (liece-nick-get-user-at-host nick))
58         (setq to (concat to " <" uah ">")))
59     (if (fboundp composefunc)
60         (funcall composefunc to nil (` (("User-Agent" . (, user-agent))))))))
61
62 (defun liece-command-submit-bug-report ()
63   "Send a bug report to the Gnus maintainers."
64   (interactive)
65   (require 'reporter)
66   
67   (reporter-submit-bug-report
68    liece-maintainer-address
69    (liece-version)
70    (let ((base (list 'window-system
71                      'liece-highlight-mode
72                      'liece-detect-coding-system)))
73      base)))
74   
75 (provide 'liece-mail)
76
77 ;;; liece-mail.el ends here