annotate lisp/gnus/gnus-ml.el @ 112314:b43e3dd4da2d

* lib/COPYING: New file, a copy of COPYING.
author Paul Eggert <eggert@cs.ucla.edu>
date Sat, 08 Jan 2011 23:43:55 -0800
parents 8d09094063d0
children 417b1e4d63cd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
56927
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
1 ;;; gnus-ml.el --- Mailing list minor mode for Gnus
31717
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2
64754
fafd692d1e40 Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents: 64085
diff changeset
3 ;; Copyright (C) 2000, 2001, 2002, 2003, 2004,
106815
1d1d5d9bd884 Add 2010 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 100908
diff changeset
4 ;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
31717
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
6 ;; Author: Julien Gilles <jgilles@free.fr>
71262
70b055c73c8c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
7 ;; Keywords: news, mail
31717
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
8
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
9 ;; This file is part of GNU Emacs.
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
10
94662
f42ef85caf91 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 93975
diff changeset
11 ;; GNU Emacs is free software: you can redistribute it and/or modify
31717
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
12 ;; it under the terms of the GNU General Public License as published by
94662
f42ef85caf91 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 93975
diff changeset
13 ;; the Free Software Foundation, either version 3 of the License, or
f42ef85caf91 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 93975
diff changeset
14 ;; (at your option) any later version.
31717
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
15
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
16 ;; GNU Emacs is distributed in the hope that it will be useful,
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
19 ;; GNU General Public License for more details.
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
20
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
21 ;; You should have received a copy of the GNU General Public License
94662
f42ef85caf91 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 93975
diff changeset
22 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
31717
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
23
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
24 ;;; Commentary:
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
25
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
26 ;; implement (small subset of) RFC 2369
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
27
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
28 ;;; Code:
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
29
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
30 (require 'gnus)
33269
d551fdccd8bc 2000-10-01 08:32:42 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31717
diff changeset
31 (require 'gnus-msg)
31717
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
32 (eval-when-compile (require 'cl))
108256
f2dd5d43653f Require easy-mmode for XEmacs when compiling.
Katsumi Yamaoka <yamaoka@jpl.org>
parents: 108215
diff changeset
33 (eval-when-compile
f2dd5d43653f Require easy-mmode for XEmacs when compiling.
Katsumi Yamaoka <yamaoka@jpl.org>
parents: 108215
diff changeset
34 (when (featurep 'xemacs)
f2dd5d43653f Require easy-mmode for XEmacs when compiling.
Katsumi Yamaoka <yamaoka@jpl.org>
parents: 108215
diff changeset
35 (require 'easy-mmode))) ; for `define-minor-mode'
31717
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
36
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
37 ;;; Mailing list minor mode
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
38
108215
8264830363ca Use define-minor-mode in Gnus where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 106815
diff changeset
39 (defvar gnus-mailing-list-mode-map
8264830363ca Use define-minor-mode in Gnus where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 106815
diff changeset
40 (let ((map (make-sparse-keymap)))
8264830363ca Use define-minor-mode in Gnus where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 106815
diff changeset
41 (gnus-define-keys map
8264830363ca Use define-minor-mode in Gnus where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 106815
diff changeset
42 "\C-c\C-nh" gnus-mailing-list-help
8264830363ca Use define-minor-mode in Gnus where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 106815
diff changeset
43 "\C-c\C-ns" gnus-mailing-list-subscribe
8264830363ca Use define-minor-mode in Gnus where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 106815
diff changeset
44 "\C-c\C-nu" gnus-mailing-list-unsubscribe
8264830363ca Use define-minor-mode in Gnus where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 106815
diff changeset
45 "\C-c\C-np" gnus-mailing-list-post
8264830363ca Use define-minor-mode in Gnus where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 106815
diff changeset
46 "\C-c\C-no" gnus-mailing-list-owner
8264830363ca Use define-minor-mode in Gnus where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 106815
diff changeset
47 "\C-c\C-na" gnus-mailing-list-archive)
8264830363ca Use define-minor-mode in Gnus where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 106815
diff changeset
48 map))
31717
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
49
33269
d551fdccd8bc 2000-10-01 08:32:42 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31717
diff changeset
50 (defvar gnus-mailing-list-menu)
d551fdccd8bc 2000-10-01 08:32:42 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31717
diff changeset
51
31717
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
52 (defun gnus-mailing-list-make-menu-bar ()
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
53 (unless (boundp 'gnus-mailing-list-menu)
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
54 (easy-menu-define
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
55 gnus-mailing-list-menu gnus-mailing-list-mode-map ""
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
56 '("Mailing-Lists"
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
57 ["Get help" gnus-mailing-list-help t]
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
58 ["Subscribe" gnus-mailing-list-subscribe t]
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
59 ["Unsubscribe" gnus-mailing-list-unsubscribe t]
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
60 ["Post a message" gnus-mailing-list-post t]
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
61 ["Mail to owner" gnus-mailing-list-owner t]
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
62 ["Browse archive" gnus-mailing-list-archive t]))))
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
63
33269
d551fdccd8bc 2000-10-01 08:32:42 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31717
diff changeset
64 ;;;###autoload
31717
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
65 (defun turn-on-gnus-mailing-list-mode ()
56927
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
66 (when (gnus-group-find-parameter gnus-newsgroup-name 'to-list)
31717
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
67 (gnus-mailing-list-mode 1)))
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
68
33269
d551fdccd8bc 2000-10-01 08:32:42 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31717
diff changeset
69 ;;;###autoload
56927
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
70 (defun gnus-mailing-list-insinuate (&optional force)
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
71 "Setup group parameters from List-Post header.
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
72 If FORCE is non-nil, replace the old ones."
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
73 (interactive "P")
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
74 (let ((list-post
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
75 (with-current-buffer gnus-original-article-buffer
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
76 (gnus-fetch-field "list-post"))))
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
77 (if list-post
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
78 (if (and (not force)
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
79 (gnus-group-get-parameter gnus-newsgroup-name 'to-list))
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
80 (gnus-message 1 "to-list is non-nil.")
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
81 (if (string-match "<mailto:\\([^>]*\\)>" list-post)
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
82 (setq list-post (match-string 1 list-post)))
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
83 (gnus-group-add-parameter gnus-newsgroup-name
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
84 (cons 'to-list list-post))
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
85 (gnus-mailing-list-mode 1))
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
86 (gnus-message 1 "no list-post in this message."))))
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
87
108287
c0d13767677a Synch with Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents: 108256
diff changeset
88 (eval-when-compile
c0d13767677a Synch with Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents: 108256
diff changeset
89 (when (featurep 'xemacs)
c0d13767677a Synch with Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents: 108256
diff changeset
90 (defvar gnus-mailing-list-mode-hook)
c0d13767677a Synch with Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents: 108256
diff changeset
91 (defvar gnus-mailing-list-mode-on-hook)
c0d13767677a Synch with Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents: 108256
diff changeset
92 (defvar gnus-mailing-list-mode-off-hook)))
c0d13767677a Synch with Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents: 108256
diff changeset
93
56927
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
94 ;;;###autoload
108215
8264830363ca Use define-minor-mode in Gnus where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 106815
diff changeset
95 (define-minor-mode gnus-mailing-list-mode
31717
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
96 "Minor mode for providing mailing-list commands.
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
97
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
98 \\{gnus-mailing-list-mode-map}"
108215
8264830363ca Use define-minor-mode in Gnus where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 106815
diff changeset
99 :lighter " Mailing-List"
8264830363ca Use define-minor-mode in Gnus where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 106815
diff changeset
100 :keymap gnus-mailing-list-mode-map
8264830363ca Use define-minor-mode in Gnus where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 106815
diff changeset
101 (cond
8264830363ca Use define-minor-mode in Gnus where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 106815
diff changeset
102 ((not (derived-mode-p 'gnus-summary-mode))
8264830363ca Use define-minor-mode in Gnus where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 106815
diff changeset
103 (setq gnus-mailing-list-mode nil))
8264830363ca Use define-minor-mode in Gnus where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 106815
diff changeset
104 (gnus-mailing-list-mode
8264830363ca Use define-minor-mode in Gnus where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 106815
diff changeset
105 ;; Set up the menu.
8264830363ca Use define-minor-mode in Gnus where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 106815
diff changeset
106 (when (gnus-visual-p 'mailing-list-menu 'menu)
8264830363ca Use define-minor-mode in Gnus where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 106815
diff changeset
107 (gnus-mailing-list-make-menu-bar)))))
31717
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
108
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
109 ;;; Commands
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
110
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
111 (defun gnus-mailing-list-help ()
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
112 "Get help from mailing list server."
49598
0d8b17d428b5 Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 38413
diff changeset
113 (interactive)
0d8b17d428b5 Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 38413
diff changeset
114 (let ((list-help
33269
d551fdccd8bc 2000-10-01 08:32:42 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31717
diff changeset
115 (with-current-buffer gnus-original-article-buffer
d551fdccd8bc 2000-10-01 08:32:42 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31717
diff changeset
116 (gnus-fetch-field "list-help"))))
d551fdccd8bc 2000-10-01 08:32:42 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31717
diff changeset
117 (cond (list-help (gnus-mailing-list-message list-help))
d551fdccd8bc 2000-10-01 08:32:42 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31717
diff changeset
118 (t (gnus-message 1 "no list-help in this group")))))
31717
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
119
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
120 (defun gnus-mailing-list-subscribe ()
71262
70b055c73c8c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
121 "Subscribe to mailing list."
31717
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
122 (interactive)
49598
0d8b17d428b5 Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 38413
diff changeset
123 (let ((list-subscribe
33269
d551fdccd8bc 2000-10-01 08:32:42 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31717
diff changeset
124 (with-current-buffer gnus-original-article-buffer
d551fdccd8bc 2000-10-01 08:32:42 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31717
diff changeset
125 (gnus-fetch-field "list-subscribe"))))
d551fdccd8bc 2000-10-01 08:32:42 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31717
diff changeset
126 (cond (list-subscribe (gnus-mailing-list-message list-subscribe))
d551fdccd8bc 2000-10-01 08:32:42 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31717
diff changeset
127 (t (gnus-message 1 "no list-subscribe in this group")))))
31717
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
128
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
129 (defun gnus-mailing-list-unsubscribe ()
71262
70b055c73c8c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
130 "Unsubscribe from mailing list."
31717
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
131 (interactive)
49598
0d8b17d428b5 Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 38413
diff changeset
132 (let ((list-unsubscribe
33269
d551fdccd8bc 2000-10-01 08:32:42 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31717
diff changeset
133 (with-current-buffer gnus-original-article-buffer
d551fdccd8bc 2000-10-01 08:32:42 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31717
diff changeset
134 (gnus-fetch-field "list-unsubscribe"))))
d551fdccd8bc 2000-10-01 08:32:42 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31717
diff changeset
135 (cond (list-unsubscribe (gnus-mailing-list-message list-unsubscribe))
d551fdccd8bc 2000-10-01 08:32:42 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31717
diff changeset
136 (t (gnus-message 1 "no list-unsubscribe in this group")))))
31717
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
137
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
138 (defun gnus-mailing-list-post ()
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
139 "Post message (really useful ?)"
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
140 (interactive)
49598
0d8b17d428b5 Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 38413
diff changeset
141 (let ((list-post
33269
d551fdccd8bc 2000-10-01 08:32:42 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31717
diff changeset
142 (with-current-buffer gnus-original-article-buffer
d551fdccd8bc 2000-10-01 08:32:42 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31717
diff changeset
143 (gnus-fetch-field "list-post"))))
d551fdccd8bc 2000-10-01 08:32:42 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31717
diff changeset
144 (cond (list-post (gnus-mailing-list-message list-post))
d551fdccd8bc 2000-10-01 08:32:42 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31717
diff changeset
145 (t (gnus-message 1 "no list-post in this group")))))
31717
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
146
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
147 (defun gnus-mailing-list-owner ()
71262
70b055c73c8c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
148 "Mail to the mailing list owner."
31717
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
149 (interactive)
49598
0d8b17d428b5 Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 38413
diff changeset
150 (let ((list-owner
33269
d551fdccd8bc 2000-10-01 08:32:42 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31717
diff changeset
151 (with-current-buffer gnus-original-article-buffer
d551fdccd8bc 2000-10-01 08:32:42 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31717
diff changeset
152 (gnus-fetch-field "list-owner"))))
d551fdccd8bc 2000-10-01 08:32:42 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31717
diff changeset
153 (cond (list-owner (gnus-mailing-list-message list-owner))
d551fdccd8bc 2000-10-01 08:32:42 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31717
diff changeset
154 (t (gnus-message 1 "no list-owner in this group")))))
31717
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
155
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
156 (defun gnus-mailing-list-archive ()
71262
70b055c73c8c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
157 "Browse archive."
31717
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
158 (interactive)
56927
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
159 (require 'browse-url)
49598
0d8b17d428b5 Trailing whitepace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents: 38413
diff changeset
160 (let ((list-archive
33269
d551fdccd8bc 2000-10-01 08:32:42 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31717
diff changeset
161 (with-current-buffer gnus-original-article-buffer
d551fdccd8bc 2000-10-01 08:32:42 ShengHuo ZHU <zsh@cs.rochester.edu>
Dave Love <fx@gnu.org>
parents: 31717
diff changeset
162 (gnus-fetch-field "list-archive"))))
56927
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
163 (cond (list-archive
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
164 (if (string-match "<\\(http:[^>]*\\)>" list-archive)
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
165 (browse-url (match-string 1 list-archive))
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
166 (browse-url list-archive)))
55fd4f77387a Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
167 (t (gnus-message 1 "no list-archive in this group")))))
31717
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
168
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
169 ;;; Utility functions
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
170
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
171 (defun gnus-mailing-list-message (address)
71262
70b055c73c8c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
172 "Send message to ADDRESS.
70b055c73c8c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
173 ADDRESS is specified by a \"mailto:\" URL."
70b055c73c8c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
174 (cond
70b055c73c8c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
175 ((string-match "<\\(mailto:[^>]*\\)>" address)
70b055c73c8c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
176 (require 'gnus-art)
70b055c73c8c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
177 (gnus-url-mailto (match-string 1 address)))
70b055c73c8c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
178 ;; other case <http://...> to be done.
70b055c73c8c Merge from gnus--rel--5.10
Miles Bader <miles@gnu.org>
parents: 68633
diff changeset
179 (t nil)))
31717
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
180
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
181 (provide 'gnus-ml)
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
182
6b20b7e85e3c *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
183 ;;; gnus-ml.el ends here