Mercurial > emacs
annotate lisp/gnus/legacy-gnus-agent.el @ 112218:376148b31b5e
Add 2011 to FSF/AIST copyright years.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sun, 02 Jan 2011 15:50:46 -0800 |
parents | 1d1d5d9bd884 |
children | 417b1e4d63cd |
rev | line source |
---|---|
74609 | 1 ;;; gnus-agent.el --- Legacy unplugged support for Gnus |
2 | |
112218
376148b31b5e
Add 2011 to FSF/AIST copyright years.
Glenn Morris <rgm@gnu.org>
parents:
106815
diff
changeset
|
3 ;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. |
74609 | 4 |
5 ;; Author: Kevin Greiner <kgreiner@xpediantsolutions.com> | |
6 ;; Keywords: news | |
7 | |
8 ;; This file is part of GNU Emacs. | |
9 | |
94662
f42ef85caf91
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
10 ;; GNU Emacs is free software: you can redistribute it and/or modify |
74609 | 11 ;; 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:
87649
diff
changeset
|
12 ;; 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:
87649
diff
changeset
|
13 ;; (at your option) any later version. |
74609 | 14 |
15 ;; GNU Emacs is distributed in the hope that it will be useful, | |
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
94662
f42ef85caf91
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
87649
diff
changeset
|
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
74609 | 18 ;; GNU General Public License for more details. |
19 | |
20 ;; 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:
87649
diff
changeset
|
21 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
74609 | 22 |
23 ;;; Commentary: | |
24 | |
25 ;; Conversion functions for the Agent. | |
26 | |
27 ;;; Code: | |
57630
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
28 (require 'gnus-start) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
29 (require 'gnus-util) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
30 (require 'gnus-range) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
31 (require 'gnus-agent) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
32 |
74609 | 33 ;; Oort Gnus v0.08 - This release updated agent to no longer use |
34 ;; history file and to support a compressed alist. | |
57630
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
35 |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
36 (defvar gnus-agent-compressed-agentview-search-only nil) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
37 |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
38 (defun gnus-agent-convert-to-compressed-agentview (converting-to) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
39 "Iterates over all agentview files to ensure that they have been |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
40 converted to the compressed format." |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
41 |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
42 (let ((search-in (list gnus-agent-directory)) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
43 here |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
44 members |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
45 member |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
46 converted-something) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
47 (while (setq here (pop search-in)) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
48 (setq members (directory-files here t)) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
49 (while (setq member (pop members)) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
50 (cond ((string-match "/\\.\\.?$" member) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
51 nil) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
52 ((file-directory-p member) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
53 (push member search-in)) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
54 ((equal (file-name-nondirectory member) ".agentview") |
63418
80595c2e2d74
(gnus-agent-unlist-expire-days): Follow error conventions.
Juanma Barranquero <lekktu@gmail.com>
parents:
57630
diff
changeset
|
55 (setq converted-something |
57630
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
56 (or (gnus-agent-convert-agentview member) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
57 converted-something)))))) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
58 |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
59 (if converted-something |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
60 (gnus-message 4 "Successfully converted Gnus %s offline (agent) files to %s" gnus-newsrc-file-version converting-to)))) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
61 |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
62 (defun gnus-agent-convert-to-compressed-agentview-prompt () |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
63 (catch 'found-file-to-convert |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
64 (let ((gnus-agent-compressed-agentview-search-only t)) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
65 (gnus-agent-convert-to-compressed-agentview nil)))) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
66 |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
67 (gnus-convert-mark-converter-prompt 'gnus-agent-convert-to-compressed-agentview 'gnus-agent-convert-to-compressed-agentview-prompt) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
68 |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
69 (defun gnus-agent-convert-agentview (file) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
70 "Load FILE and do a `read' there." |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
71 (with-temp-buffer |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
72 (nnheader-insert-file-contents file) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
73 (goto-char (point-min)) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
74 (let ((inhibit-quit t) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
75 (alist (read (current-buffer))) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
76 (version (condition-case nil (read (current-buffer)) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
77 (end-of-file 0))) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
78 changed-version |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
79 history-file) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
80 |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
81 (cond |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
82 ((= version 0) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
83 (let (entry |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
84 (gnus-command-method nil)) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
85 (mm-disable-multibyte) ;; everything is binary |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
86 (erase-buffer) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
87 (insert "\n") |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
88 (let ((file (concat (file-name-directory file) "/history"))) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
89 (when (file-exists-p file) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
90 (nnheader-insert-file-contents file) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
91 (setq history-file file))) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
92 |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
93 (goto-char (point-min)) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
94 (while (not (eobp)) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
95 (if (and (looking-at |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
96 "[^\t\n]+\t\\([0-9]+\\)\t\\([^ \n]+\\) \\([0-9]+\\)") |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
97 (string= (gnus-agent-article-name ".agentview" (match-string 2)) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
98 file) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
99 (setq entry (assoc (string-to-number (match-string 3)) alist))) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
100 (setcdr entry (string-to-number (match-string 1)))) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
101 (forward-line 1)) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
102 (setq changed-version t))) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
103 ((= version 1) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
104 (setq changed-version t))) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
105 |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
106 (when changed-version |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
107 (when gnus-agent-compressed-agentview-search-only |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
108 (throw 'found-file-to-convert t)) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
109 |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
110 (erase-buffer) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
111 (let (article-id day-of-download comp-list compressed) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
112 (while alist |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
113 (setq article-id (caar alist) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
114 day-of-download (cdar alist) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
115 comp-list (assq day-of-download compressed) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
116 alist (cdr alist)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
117 (if comp-list |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
118 (setcdr comp-list (cons article-id (cdr comp-list))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
119 (push (list day-of-download article-id) compressed))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
120 (setq alist compressed) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
121 (while alist |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
122 (setq comp-list (pop alist)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
123 (setcdr comp-list |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
124 (gnus-compress-sequence (nreverse (cdr comp-list))))) |
57630
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
125 (princ compressed (current-buffer))) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
126 (insert "\n2\n") |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
127 (write-file file) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
128 (when history-file |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
129 (delete-file history-file)) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
130 t)))) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
131 |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
132 ;; End of Oort Gnus v0.08 updates |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
133 |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
134 ;; No Gnus v0.3 - This release provides a mechanism for upgrading gnus |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
135 ;; from previous versions. Therefore, the previous |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
136 ;; hacks to handle a gnus-agent-expire-days that |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
137 ;; specifies a list of values can be removed. |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
138 |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
139 (defun gnus-agent-unlist-expire-days (converting-to) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
140 (when (listp gnus-agent-expire-days) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
141 (let (buffer) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
142 (unwind-protect |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
143 (save-window-excursion |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
144 (setq buffer (gnus-get-buffer-create " *Gnus agent upgrade*")) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
145 (set-buffer buffer) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
146 (erase-buffer) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
147 (insert "The definition of gnus-agent-expire-days has been changed.\nYou currently have it set to the list:\n ") |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
148 (gnus-pp gnus-agent-expire-days) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
149 |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
150 (insert "\nIn order to use version '" converting-to "' of gnus, you will need to set\n") |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
151 (insert "gnus-agent-expire-days to an integer. If you still wish to set different\n") |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
152 (insert "expiration days to individual groups, you must instead set the\n") |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
153 (insert "'agent-days-until-old group and/or topic parameter.\n") |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
154 (insert "\n") |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
155 (insert "If you would like, gnus can iterate over every group comparing its name to the\n") |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
156 (insert "regular expressions that you currently have in gnus-agent-expire-days. When\n") |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
157 (insert "gnus finds a match, it will update that group's 'agent-days-until-old group\n") |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
158 (insert "parameter to the value associated with the regular expression.\n") |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
159 (insert "\n") |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
160 (insert "Whether gnus assigns group parameters, or not, gnus will terminate with an\n") |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
161 (insert "ERROR as soon as this function completes. The reason is that you must\n") |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
162 (insert "manually edit your configuration to either not set gnus-agent-expire-days or\n") |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
163 (insert "to set it to an integer before gnus can be used.\n") |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
164 (insert "\n") |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
165 (insert "Once you have successfully edited gnus-agent-expire-days, gnus will be able to\n") |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
166 (insert "execute past this function.\n") |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
167 (insert "\n") |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
168 (insert "Should gnus use gnus-agent-expire-days to assign\n") |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
169 (insert "agent-days-until-old parameters to individual groups? (Y/N)") |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
170 |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
171 (switch-to-buffer buffer) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
172 (beep) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
173 (beep) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
174 |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
175 (let ((echo-keystrokes 0) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
176 c) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
177 (while (progn (setq c (read-char-exclusive)) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
178 (cond ((or (eq c ?y) (eq c ?Y)) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
179 (save-excursion |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
180 (let ((groups (gnus-group-listed-groups))) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
181 (while groups |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
182 (let* ((group (pop groups)) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
183 (days gnus-agent-expire-days) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
184 (day (catch 'found |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
185 (while days |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
186 (when (eq 0 (string-match |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
187 (caar days) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
188 group)) |
100993 | 189 (throw 'found (cadr (car days)))) |
57630
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
190 (setq days (cdr days))) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
191 nil))) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
192 (when day |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
193 (gnus-group-set-parameter group 'agent-days-until-old |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
194 day)))))) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
195 nil |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
196 ) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
197 ((or (eq c ?n) (eq c ?N)) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
198 nil) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
199 (t |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
200 t)))))) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
201 (kill-buffer buffer)) |
63418
80595c2e2d74
(gnus-agent-unlist-expire-days): Follow error conventions.
Juanma Barranquero <lekktu@gmail.com>
parents:
57630
diff
changeset
|
202 (error "Change gnus-agent-expire-days to an integer for gnus to start")))) |
57630
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
203 |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
204 ;; The gnus-agent-unlist-expire-days has its own conversion prompt. |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
205 ;; Therefore, hide the default prompt. |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
206 (gnus-convert-mark-converter-prompt 'gnus-agent-unlist-expire-days t) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
207 |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
208 (defun gnus-agent-unhook-expire-days (converting-to) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
209 "Remove every lambda from gnus-group-prepare-hook that mention the |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
210 symbol gnus-agent-do-once in their definition. This should NOT be |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
211 necessary as gnus-agent.el no longer adds them. However, it is |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
212 possible that the hook was persistently saved." |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
213 (let ((h t)) ; iterate from bgn of hook |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
214 (while h |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
215 (let ((func (progn (when (eq h t) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
216 ;; init h to list of functions |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
217 (setq h (cond ((listp gnus-group-prepare-hook) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
218 gnus-group-prepare-hook) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
219 ((boundp 'gnus-group-prepare-hook) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
220 (list gnus-group-prepare-hook))))) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
221 (pop h)))) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
222 |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
223 (when (cond ((eq (type-of func) 'compiled-function) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
224 ;; Search def. of compiled function for gnus-agent-do-once string |
63418
80595c2e2d74
(gnus-agent-unlist-expire-days): Follow error conventions.
Juanma Barranquero <lekktu@gmail.com>
parents:
57630
diff
changeset
|
225 (let* (definition |
80595c2e2d74
(gnus-agent-unlist-expire-days): Follow error conventions.
Juanma Barranquero <lekktu@gmail.com>
parents:
57630
diff
changeset
|
226 print-level |
57630
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
227 print-length |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
228 (standard-output |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
229 (lambda (char) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
230 (setq definition (cons char definition))))) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
231 (princ func) ; populates definition with reversed list of characters |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
232 (let* ((i (length definition)) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
233 (s (make-string i 0))) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
234 (while definition |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
235 (aset s (setq i (1- i)) (pop definition))) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
236 |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
237 (string-match "\\bgnus-agent-do-once\\b" s)))) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
238 ((listp func) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
239 (eq (cadr (nth 2 func)) 'gnus-agent-do-once) ; handles eval'd lambda |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
240 )) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
241 |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
242 (remove-hook 'gnus-group-prepare-hook func) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
243 ;; I don't what remove-hook is going to actually do to the |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
244 ;; hook list so start over from the beginning. |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
245 (setq h t)))))) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
246 |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
247 ;; gnus-agent-unhook-expire-days is safe in that it does not modify |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
248 ;; the .newsrc.eld file. |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
249 (gnus-convert-mark-converter-prompt 'gnus-agent-unhook-expire-days t) |
858ea3714664
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-631
Miles Bader <miles@gnu.org>
parents:
diff
changeset
|
250 |
74609 | 251 (provide 'legacy-gnus-agent) |
252 | |
253 ;; arch-tag: 845c7b8a-88f7-4468-b8d7-94e8fc72cf1a | |
254 ;;; legacy-gnus-agent.el ends here |