Mercurial > emacs
annotate lisp/gnus/gnus-start.el @ 110807:3c97e9b7b34f
Rename some more shadow.el stuff.
* lisp/emacs-lisp/shadow.el (load-path-shadows-font-lock-keywords)
(load-path-shadows-find-file): Rename variable and button.
(list-load-path-shadows): Update button caller.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Thu, 07 Oct 2010 10:22:51 -0700 |
parents | 42815c76b976 |
children | 07053df95af6 |
rev | line source |
---|---|
17493 | 1 ;;; gnus-start.el --- startup functions for Gnus |
64754
fafd692d1e40
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64085
diff
changeset
|
2 |
fafd692d1e40
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64085
diff
changeset
|
3 ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
106815 | 4 ;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. |
17493 | 5 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
6 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> |
17493 | 7 ;; Keywords: news |
8 | |
9 ;; This file is part of GNU Emacs. | |
10 | |
94662
f42ef85caf91
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
91327
diff
changeset
|
11 ;; GNU Emacs is free software: you can redistribute it and/or modify |
17493 | 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:
91327
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:
91327
diff
changeset
|
14 ;; (at your option) any later version. |
17493 | 15 |
16 ;; GNU Emacs is distributed in the hope that it will be useful, | |
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
74149
1bf9e5a9c07a
(gnus-options-subscribe, gnus-options-not-subscribe, gnus-subscribe-newsgroup,
Juanma Barranquero <lekktu@gmail.com>
parents:
71884
diff
changeset
|
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17493 | 19 ;; GNU General Public License for more details. |
20 | |
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:
91327
diff
changeset
|
22 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
17493 | 23 |
24 ;;; Commentary: | |
25 | |
26 ;;; Code: | |
27 | |
28 (require 'gnus) | |
29 (require 'gnus-win) | |
30 (require 'gnus-int) | |
31 (require 'gnus-spec) | |
32 (require 'gnus-range) | |
33 (require 'gnus-util) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
34 (autoload 'message-make-date "message") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
35 (autoload 'gnus-agent-read-servers-validate "gnus-agent") |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
36 (autoload 'gnus-agent-save-local "gnus-agent") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
37 (autoload 'gnus-agent-possibly-alter-active "gnus-agent") |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
38 |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
58959
diff
changeset
|
39 (eval-when-compile |
86154 | 40 (require 'cl)) |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
41 |
86154 | 42 (defvar gnus-agent-covered-methods) |
43 (defvar gnus-agent-file-loading-local) | |
44 (defvar gnus-agent-file-loading-cache) | |
17493 | 45 |
46 (defcustom gnus-startup-file (nnheader-concat gnus-home-directory ".newsrc") | |
47 "Your `.newsrc' file. | |
48 `.newsrc-SERVER' will be used instead if that exists." | |
49 :group 'gnus-start | |
50 :type 'file) | |
51 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
52 (defcustom gnus-backup-startup-file 'never |
100454 | 53 "Control use of version numbers for backups of `gnus-startup-file'. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
54 This variable takes the same values as the `version-control' |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
55 variable." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
58959
diff
changeset
|
56 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
57 :group 'gnus-start |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
58 :type '(choice (const :tag "Never" never) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
59 (const :tag "If existing" nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
60 (other :tag "Always" t))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
61 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
62 (defcustom gnus-save-startup-file-via-temp-buffer t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
63 "Whether to write the startup file contents to a buffer then save |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
64 the buffer or write directly to the file. The buffer is faster |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
65 because all of the contents are written at once. The direct write |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
66 uses considerably less memory." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
58959
diff
changeset
|
67 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
68 :group 'gnus-start |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
69 :type '(choice (const :tag "Write via buffer" t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
70 (const :tag "Write directly to file" nil))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
71 |
17493 | 72 (defcustom gnus-init-file (nnheader-concat gnus-home-directory ".gnus") |
19910
103cd29aea6f
(gnus-default-subscribed-newsgroups): Fix custom type. Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
19520
diff
changeset
|
73 "Your Gnus Emacs-Lisp startup file name. |
103cd29aea6f
(gnus-default-subscribed-newsgroups): Fix custom type. Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
19520
diff
changeset
|
74 If a file with the `.el' or `.elc' suffixes exists, it will be read instead." |
17493 | 75 :group 'gnus-start |
76 :type 'file) | |
77 | |
78 (defcustom gnus-site-init-file | |
19520
6496595d79b8
Require cl at compile time.
Richard M. Stallman <rms@gnu.org>
parents:
17493
diff
changeset
|
79 (condition-case nil |
19910
103cd29aea6f
(gnus-default-subscribed-newsgroups): Fix custom type. Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
19520
diff
changeset
|
80 (concat (file-name-directory |
103cd29aea6f
(gnus-default-subscribed-newsgroups): Fix custom type. Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
19520
diff
changeset
|
81 (directory-file-name installation-directory)) |
103cd29aea6f
(gnus-default-subscribed-newsgroups): Fix custom type. Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
19520
diff
changeset
|
82 "site-lisp/gnus-init") |
19520
6496595d79b8
Require cl at compile time.
Richard M. Stallman <rms@gnu.org>
parents:
17493
diff
changeset
|
83 (error nil)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
84 "The site-wide Gnus Emacs-Lisp startup file name, or nil if none. |
19910
103cd29aea6f
(gnus-default-subscribed-newsgroups): Fix custom type. Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
19520
diff
changeset
|
85 If a file with the `.el' or `.elc' suffixes exists, it will be read instead." |
17493 | 86 :group 'gnus-start |
19910
103cd29aea6f
(gnus-default-subscribed-newsgroups): Fix custom type. Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
19520
diff
changeset
|
87 :type '(choice file (const nil))) |
17493 | 88 |
89 (defcustom gnus-default-subscribed-newsgroups nil | |
19910
103cd29aea6f
(gnus-default-subscribed-newsgroups): Fix custom type. Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
19520
diff
changeset
|
90 "List of newsgroups to subscribe, when a user runs Gnus the first time. |
103cd29aea6f
(gnus-default-subscribed-newsgroups): Fix custom type. Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
19520
diff
changeset
|
91 The value should be a list of strings. |
103cd29aea6f
(gnus-default-subscribed-newsgroups): Fix custom type. Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
19520
diff
changeset
|
92 If it is t, Gnus will not do anything special the first time it is |
17493 | 93 started; it'll just use the normal newsgroups subscription methods." |
94 :group 'gnus-start | |
19910
103cd29aea6f
(gnus-default-subscribed-newsgroups): Fix custom type. Doc fix.
Richard M. Stallman <rms@gnu.org>
parents:
19520
diff
changeset
|
95 :type '(choice (repeat string) (const :tag "Nothing special" t))) |
17493 | 96 |
97 (defcustom gnus-use-dribble-file t | |
98 "*Non-nil means that Gnus will use a dribble file to store user updates. | |
99 If Emacs should crash without saving the .newsrc files, complete | |
100 information can be restored from the dribble file." | |
101 :group 'gnus-dribble-file | |
102 :type 'boolean) | |
103 | |
104 (defcustom gnus-dribble-directory nil | |
105 "*The directory where dribble files will be saved. | |
106 If this variable is nil, the directory where the .newsrc files are | |
107 saved will be used." | |
108 :group 'gnus-dribble-file | |
109 :type '(choice directory (const nil))) | |
110 | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19910
diff
changeset
|
111 (defcustom gnus-check-new-newsgroups 'ask-server |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
112 "*Non-nil means that Gnus will run `gnus-find-new-newsgroups' at startup. |
17493 | 113 This normally finds new newsgroups by comparing the active groups the |
114 servers have already reported with those Gnus already knows, either alive | |
115 or killed. | |
116 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
117 When any of the following are true, `gnus-find-new-newsgroups' will instead |
17493 | 118 ask the servers (primary, secondary, and archive servers) to list new |
119 groups since the last time it checked: | |
120 1. This variable is `ask-server'. | |
121 2. This variable is a list of select methods (see below). | |
122 3. `gnus-read-active-file' is nil or `some'. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
123 4. A prefix argument is given to `gnus-find-new-newsgroups' interactively. |
17493 | 124 |
125 Thus, if this variable is `ask-server' or a list of select methods or | |
126 `gnus-read-active-file' is nil or `some', then the killed list is no | |
127 longer necessary, so you could safely set `gnus-save-killed-list' to nil. | |
128 | |
129 This variable can be a list of select methods which Gnus will query with | |
130 the `ask-server' method in addition to the primary, secondary, and archive | |
131 servers. | |
132 | |
133 Eg. | |
134 (setq gnus-check-new-newsgroups | |
135 '((nntp \"some.server\") (nntp \"other.server\"))) | |
136 | |
137 If this variable is nil, then you have to tell Gnus explicitly to | |
138 check for new newsgroups with \\<gnus-group-mode-map>\\[gnus-find-new-newsgroups]." | |
139 :group 'gnus-start | |
140 :type '(choice (const :tag "no" nil) | |
141 (const :tag "by brute force" t) | |
142 (const :tag "ask servers" ask-server) | |
143 (repeat :menu-tag "ask additional servers" | |
144 :tag "ask additional servers" | |
145 :value ((nntp "")) | |
146 (sexp :format "%v")))) | |
147 | |
148 (defcustom gnus-check-bogus-newsgroups nil | |
149 "*Non-nil means that Gnus will check and remove bogus newsgroup at startup. | |
150 If this variable is nil, then you have to tell Gnus explicitly to | |
151 check for bogus newsgroups with \\<gnus-group-mode-map>\\[gnus-group-check-bogus-groups]." | |
152 :group 'gnus-start-server | |
153 :type 'boolean) | |
154 | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19910
diff
changeset
|
155 (defcustom gnus-read-active-file 'some |
17493 | 156 "*Non-nil means that Gnus will read the entire active file at startup. |
157 If this variable is nil, Gnus will only know about the groups in your | |
158 `.newsrc' file. | |
159 | |
160 If this variable is `some', Gnus will try to only read the relevant | |
161 parts of the active file from the server. Not all servers support | |
162 this, and it might be quite slow with other servers, but this should | |
163 generally be faster than both the t and nil value. | |
164 | |
165 If you set this variable to nil or `some', you probably still want to | |
166 be told about new newsgroups that arrive. To do that, set | |
167 `gnus-check-new-newsgroups' to `ask-server'. This may not work | |
168 properly with all servers." | |
169 :group 'gnus-start-server | |
170 :type '(choice (const nil) | |
171 (const some) | |
172 (const t))) | |
173 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
174 (defconst gnus-level-subscribed 5 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
175 "Groups with levels less than or equal to this variable are subscribed.") |
17493 | 176 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
177 (defconst gnus-level-unsubscribed 7 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
178 "Groups with levels less than or equal to this variable are unsubscribed. |
78098 | 179 |
180 Groups with levels less than `gnus-level-subscribed', which | |
181 should be less than this variable, are subscribed. Groups with | |
182 levels from `gnus-level-subscribed' (exclusive) upto this | |
183 variable (inclusive) are unsubscribed. See also | |
108724
fb43cf31d6f6
* gnus-start.el (gnus-level-unsubscribed): Doc fix. (Bug#6206)
Juri Linkov <juri@jurta.org>
parents:
108215
diff
changeset
|
184 `gnus-level-zombie', `gnus-level-killed' and the Info node `(gnus)Group |
78098 | 185 Levels' for details.") |
17493 | 186 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
187 (defconst gnus-level-zombie 8 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
188 "Groups with this level are zombie groups.") |
17493 | 189 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
190 (defconst gnus-level-killed 9 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
191 "Groups with this level are killed.") |
17493 | 192 |
193 (defcustom gnus-level-default-subscribed 3 | |
194 "*New subscribed groups will be subscribed at this level." | |
195 :group 'gnus-group-levels | |
196 :type 'integer) | |
197 | |
198 (defcustom gnus-level-default-unsubscribed 6 | |
199 "*New unsubscribed groups will be unsubscribed at this level." | |
200 :group 'gnus-group-levels | |
201 :type 'integer) | |
202 | |
203 (defcustom gnus-activate-level (1+ gnus-level-subscribed) | |
204 "*Groups higher than this level won't be activated on startup. | |
205 Setting this variable to something low might save lots of time when | |
206 you have many groups that you aren't interested in." | |
207 :group 'gnus-group-levels | |
208 :type 'integer) | |
209 | |
210 (defcustom gnus-activate-foreign-newsgroups 4 | |
211 "*If nil, Gnus will not check foreign newsgroups at startup. | |
212 If it is non-nil, it should be a number between one and nine. Foreign | |
213 newsgroups that have a level lower or equal to this number will be | |
214 activated on startup. For instance, if you want to active all | |
215 subscribed newsgroups, but not the rest, you'd set this variable to | |
216 `gnus-level-subscribed'. | |
217 | |
218 If you subscribe to lots of newsgroups from different servers, startup | |
219 might take a while. By setting this variable to nil, you'll save time, | |
220 but you won't be told how many unread articles there are in the | |
221 groups." | |
222 :group 'gnus-group-levels | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
223 :type '(choice integer |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
224 (const :tag "none" nil))) |
17493 | 225 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
226 (defcustom gnus-read-newsrc-file t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
227 "*Non-nil means that Gnus will read the `.newsrc' file. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
228 Gnus always reads its own startup file, which is called |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
229 \".newsrc.eld\". The file called \".newsrc\" is in a format that can |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
230 be readily understood by other newsreaders. If you don't plan on |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
231 using other newsreaders, set this variable to nil to save some time on |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
232 entry." |
33396
e2512753e160
(gnus-read-newsrc-file): Add :version.
Dave Love <fx@gnu.org>
parents:
33327
diff
changeset
|
233 :version "21.1" |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
234 :group 'gnus-newsrc |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
235 :type 'boolean) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
236 |
17493 | 237 (defcustom gnus-save-newsrc-file t |
238 "*Non-nil means that Gnus will save the `.newsrc' file. | |
239 Gnus always saves its own startup file, which is called | |
240 \".newsrc.eld\". The file called \".newsrc\" is in a format that can | |
241 be readily understood by other newsreaders. If you don't plan on | |
242 using other newsreaders, set this variable to nil to save some time on | |
243 exit." | |
244 :group 'gnus-newsrc | |
245 :type 'boolean) | |
246 | |
247 (defcustom gnus-save-killed-list t | |
248 "*If non-nil, save the list of killed groups to the startup file. | |
249 If you set this variable to nil, you'll save both time (when starting | |
250 and quitting) and space (both memory and disk), but it will also mean | |
251 that Gnus has no record of which groups are new and which are old, so | |
252 the automatic new newsgroups subscription methods become meaningless. | |
253 | |
254 You should always set `gnus-check-new-newsgroups' to `ask-server' or | |
255 nil if you set this variable to nil. | |
256 | |
257 This variable can also be a regexp. In that case, all groups that do | |
258 not match this regexp will be removed before saving the list." | |
259 :group 'gnus-newsrc | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
260 :type '(radio (sexp :format "Non-nil\n" |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
261 :match (lambda (widget value) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
262 (and value (not (stringp value)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
263 :value t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
264 (const nil) |
58835
9bdd97960431
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-716
Miles Bader <miles@gnu.org>
parents:
58228
diff
changeset
|
265 regexp)) |
17493 | 266 |
267 (defcustom gnus-ignored-newsgroups | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
268 (mapconcat 'identity |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
269 '("^to\\." ; not "real" groups |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
270 "^[0-9. \t]+\\( \\|$\\)" ; all digits in name |
110433
33cf78a271ef
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110428
diff
changeset
|
271 "^[\"][\"#'()]" ; bogus characters |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
272 ) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
273 "\\|") |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
274 "*A regexp to match uninteresting newsgroups in the active file. |
17493 | 275 Any lines in the active file matching this regular expression are |
276 removed from the newsgroup list before anything else is done to it, | |
277 thus making them effectively non-existent." | |
278 :group 'gnus-group-new | |
279 :type 'regexp) | |
280 | |
281 (defcustom gnus-subscribe-newsgroup-method 'gnus-subscribe-zombies | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
282 "*Function(s) called with a group name when new group is detected. |
17493 | 283 A few pre-made functions are supplied: `gnus-subscribe-randomly' |
284 inserts new groups at the beginning of the list of groups; | |
285 `gnus-subscribe-alphabetically' inserts new groups in strict | |
286 alphabetic order; `gnus-subscribe-hierarchically' inserts new groups | |
287 in hierarchical newsgroup order; `gnus-subscribe-interactively' asks | |
288 for your decision; `gnus-subscribe-killed' kills all new groups; | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
289 `gnus-subscribe-zombies' will make all new groups into zombies; |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
290 `gnus-subscribe-topics' will enter groups into the topics that |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
291 claim them." |
17493 | 292 :group 'gnus-group-new |
293 :type '(radio (function-item gnus-subscribe-randomly) | |
294 (function-item gnus-subscribe-alphabetically) | |
295 (function-item gnus-subscribe-hierarchically) | |
296 (function-item gnus-subscribe-interactively) | |
297 (function-item gnus-subscribe-killed) | |
298 (function-item gnus-subscribe-zombies) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
299 (function-item gnus-subscribe-topics) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
300 function |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
301 (repeat function))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
302 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
303 (defcustom gnus-subscribe-newsgroup-hooks nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
304 "*Hooks run after you subscribe to a new group. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
305 The hooks will be called with new group's name as argument." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
58959
diff
changeset
|
306 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
307 :group 'gnus-group-new |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
308 :type 'hook) |
17493 | 309 |
310 (defcustom gnus-subscribe-options-newsgroup-method | |
311 'gnus-subscribe-alphabetically | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
312 "*Function(s) called to subscribe newsgroups mentioned on \"options -n\" lines. |
17493 | 313 If, for instance, you want to subscribe to all newsgroups in the |
314 \"no\" and \"alt\" hierarchies, you'd put the following in your | |
315 .newsrc file: | |
316 | |
317 options -n no.all alt.all | |
318 | |
71884 | 319 Gnus will then subscribe all new newsgroups in these hierarchies |
320 with the subscription method in this variable." | |
17493 | 321 :group 'gnus-group-new |
322 :type '(radio (function-item gnus-subscribe-randomly) | |
323 (function-item gnus-subscribe-alphabetically) | |
324 (function-item gnus-subscribe-hierarchically) | |
325 (function-item gnus-subscribe-interactively) | |
326 (function-item gnus-subscribe-killed) | |
327 (function-item gnus-subscribe-zombies) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
328 (function-item gnus-subscribe-topics) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
329 function |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
330 (repeat function))) |
17493 | 331 |
332 (defcustom gnus-subscribe-hierarchical-interactive nil | |
333 "*If non-nil, Gnus will offer to subscribe hierarchically. | |
334 When a new hierarchy appears, Gnus will ask the user: | |
335 | |
336 'alt.binaries': Do you want to subscribe to this hierarchy? ([d]ys): | |
337 | |
338 If the user pressed `d', Gnus will descend the hierarchy, `y' will | |
339 subscribe to all newsgroups in the hierarchy and `s' will skip this | |
340 hierarchy in its entirety." | |
341 :group 'gnus-group-new | |
342 :type 'boolean) | |
343 | |
344 (defcustom gnus-auto-subscribed-groups | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
345 "^nnml\\|^nnfolder\\|^nnmbox\\|^nnmh\\|^nnbabyl\\|^nnmaildir" |
17493 | 346 "*All new groups that match this regexp will be subscribed automatically. |
347 Note that this variable only deals with new groups. It has no effect | |
348 whatsoever on old groups. | |
349 | |
350 New groups that match this regexp will not be handled by | |
351 `gnus-subscribe-newsgroup-method'. Instead, they will | |
352 be subscribed using `gnus-subscribe-options-newsgroup-method'." | |
353 :group 'gnus-group-new | |
354 :type 'regexp) | |
355 | |
356 (defcustom gnus-options-subscribe nil | |
357 "*All new groups matching this regexp will be subscribed unconditionally. | |
74149
1bf9e5a9c07a
(gnus-options-subscribe, gnus-options-not-subscribe, gnus-subscribe-newsgroup,
Juanma Barranquero <lekktu@gmail.com>
parents:
71884
diff
changeset
|
358 Note that this variable deals only with new newsgroups. This variable |
17493 | 359 does not affect old newsgroups. |
360 | |
361 New groups that match this regexp will not be handled by | |
362 `gnus-subscribe-newsgroup-method'. Instead, they will | |
363 be subscribed using `gnus-subscribe-options-newsgroup-method'." | |
364 :group 'gnus-group-new | |
365 :type '(choice regexp | |
366 (const :tag "none" nil))) | |
367 | |
368 (defcustom gnus-options-not-subscribe nil | |
369 "*All new groups matching this regexp will be ignored. | |
74149
1bf9e5a9c07a
(gnus-options-subscribe, gnus-options-not-subscribe, gnus-subscribe-newsgroup,
Juanma Barranquero <lekktu@gmail.com>
parents:
71884
diff
changeset
|
370 Note that this variable deals only with new newsgroups. This variable |
17493 | 371 does not affect old (already subscribed) newsgroups." |
372 :group 'gnus-group-new | |
373 :type '(choice regexp | |
374 (const :tag "none" nil))) | |
375 | |
376 (defcustom gnus-modtime-botch nil | |
377 "*Non-nil means .newsrc should be deleted prior to save. | |
378 Its use is due to the bogus appearance that .newsrc was modified on | |
379 disc." | |
380 :group 'gnus-newsrc | |
381 :type 'boolean) | |
382 | |
110516
4d2f8b81bb01
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110486
diff
changeset
|
383 (defcustom gnus-use-backend-marks nil |
4d2f8b81bb01
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110486
diff
changeset
|
384 "If non-nil, Gnus will store and retrieve marks from the backends. |
4d2f8b81bb01
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110486
diff
changeset
|
385 This means that marks will be stored both in .newsrc.eld and in |
4d2f8b81bb01
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110486
diff
changeset
|
386 the backend, and will slow operation down somewhat." |
4d2f8b81bb01
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110486
diff
changeset
|
387 :group 'gnus-newsrc |
4d2f8b81bb01
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110486
diff
changeset
|
388 :type 'boolean) |
4d2f8b81bb01
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110486
diff
changeset
|
389 |
17493 | 390 (defcustom gnus-check-bogus-groups-hook nil |
391 "A hook run after removing bogus groups." | |
392 :group 'gnus-start-server | |
393 :type 'hook) | |
394 | |
395 (defcustom gnus-startup-hook nil | |
396 "A hook called at startup. | |
397 This hook is called after Gnus is connected to the NNTP server." | |
398 :group 'gnus-start | |
399 :type 'hook) | |
400 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
401 (defcustom gnus-before-startup-hook nil |
100993 | 402 "A hook called before startup. |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
403 This hook is called as the first thing when Gnus is started." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
404 :group 'gnus-start |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
405 :type 'hook) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
406 |
17493 | 407 (defcustom gnus-started-hook nil |
408 "A hook called as the last thing after startup." | |
409 :group 'gnus-start | |
410 :type 'hook) | |
411 | |
110516
4d2f8b81bb01
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110486
diff
changeset
|
412 (defcustom gnus-setup-news-hook nil |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
413 "A hook after reading the .newsrc file, but before generating the buffer." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
414 :group 'gnus-start |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
415 :type 'hook) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
416 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
417 (defcustom gnus-get-top-new-news-hook nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
418 "A hook run just before Gnus checks for new news globally." |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
58959
diff
changeset
|
419 :version "22.1" |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
420 :group 'gnus-group-new |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
421 :type 'hook) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
422 |
17493 | 423 (defcustom gnus-get-new-news-hook nil |
424 "A hook run just before Gnus checks for new news." | |
425 :group 'gnus-group-new | |
426 :type 'hook) | |
427 | |
428 (defcustom gnus-after-getting-new-news-hook | |
110516
4d2f8b81bb01
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110486
diff
changeset
|
429 '(gnus-display-time-event-handler) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
430 "*A hook run after Gnus checks for new news when Gnus is already running." |
110541
9e932aebe7c5
gnus-start.el (gnus-after-getting-new-news-hook): Add version tag.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110516
diff
changeset
|
431 :version "24.1" |
17493 | 432 :group 'gnus-group-new |
433 :type 'hook) | |
434 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
435 (defcustom gnus-read-newsrc-el-hook nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
436 "A hook called after reading the newsrc.eld? file." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
437 :group 'gnus-newsrc |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
438 :type 'hook) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
439 |
17493 | 440 (defcustom gnus-save-newsrc-hook nil |
441 "A hook called before saving any of the newsrc files." | |
442 :group 'gnus-newsrc | |
443 :type 'hook) | |
444 | |
445 (defcustom gnus-save-quick-newsrc-hook nil | |
446 "A hook called just before saving the quick newsrc file. | |
447 Can be used to turn version control on or off." | |
448 :group 'gnus-newsrc | |
449 :type 'hook) | |
450 | |
451 (defcustom gnus-save-standard-newsrc-hook nil | |
452 "A hook called just before saving the standard newsrc file. | |
453 Can be used to turn version control on or off." | |
454 :group 'gnus-newsrc | |
455 :type 'hook) | |
456 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
457 (defcustom gnus-group-mode-hook nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
458 "Hook for Gnus group mode." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
459 :group 'gnus-group-various |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
460 :options '(gnus-topic-mode) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
461 :type 'hook) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
462 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
463 (defcustom gnus-always-read-dribble-file nil |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
464 "Unconditionally read the dribble file." |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
465 :group 'gnus-newsrc |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
466 :type 'boolean) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
467 |
38627
6520def531cc
(gnus-startup-file-coding-system): Revert to binary.
Gerd Moellmann <gerd@gnu.org>
parents:
38612
diff
changeset
|
468 ;;; Internal variables |
6520def531cc
(gnus-startup-file-coding-system): Revert to binary.
Gerd Moellmann <gerd@gnu.org>
parents:
38612
diff
changeset
|
469 |
88919
acc369108294
(gnus-read-newsrc-el-file): Don't bind
Dave Love <fx@gnu.org>
parents:
42628
diff
changeset
|
470 ;; Fixme: deal with old emacs-mule when mm-universal-coding-system is |
acc369108294
(gnus-read-newsrc-el-file): Don't bind
Dave Love <fx@gnu.org>
parents:
42628
diff
changeset
|
471 ;; utf-8-emacs. |
42627
2270bf351eba
* gnus-start.el (gnus-read-init-file): Cleaned up.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
38627
diff
changeset
|
472 (defvar gnus-ding-file-coding-system mm-universal-coding-system |
2270bf351eba
* gnus-start.el (gnus-read-init-file): Cleaned up.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
38627
diff
changeset
|
473 "Coding system for ding file.") |
17493 | 474 |
475 (defvar gnus-newsrc-file-version nil) | |
476 (defvar gnus-override-subscribe-method nil) | |
477 (defvar gnus-dribble-buffer nil) | |
478 (defvar gnus-newsrc-options nil | |
479 "Options line in the .newsrc file.") | |
480 | |
481 (defvar gnus-newsrc-options-n nil | |
482 "List of regexps representing groups to be subscribed/ignored unconditionally.") | |
483 | |
484 (defvar gnus-newsrc-last-checked-date nil | |
485 "Date Gnus last asked server for new newsgroups.") | |
486 | |
487 (defvar gnus-current-startup-file nil | |
488 "Startup file for the current host.") | |
489 | |
490 ;; Byte-compiler warning. | |
491 (defvar gnus-group-line-format) | |
492 | |
493 ;; Suggested by Brian Edmonds <edmonds@cs.ubc.ca>. | |
494 (defvar gnus-init-inhibit nil) | |
495 (defun gnus-read-init-file (&optional inhibit-next) | |
496 ;; Don't load .gnus if the -q option was used. | |
497 (when init-file-user | |
498 (if gnus-init-inhibit | |
499 (setq gnus-init-inhibit nil) | |
500 (setq gnus-init-inhibit inhibit-next) | |
42627
2270bf351eba
* gnus-start.el (gnus-read-init-file): Cleaned up.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
38627
diff
changeset
|
501 (dolist (file (list gnus-site-init-file gnus-init-file)) |
2270bf351eba
* gnus-start.el (gnus-read-init-file): Cleaned up.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
38627
diff
changeset
|
502 (when (and file |
2270bf351eba
* gnus-start.el (gnus-read-init-file): Cleaned up.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
38627
diff
changeset
|
503 (locate-library file)) |
2270bf351eba
* gnus-start.el (gnus-read-init-file): Cleaned up.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
38627
diff
changeset
|
504 (if (or debug-on-error debug-on-quit) |
2270bf351eba
* gnus-start.el (gnus-read-init-file): Cleaned up.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
38627
diff
changeset
|
505 (load file nil t) |
2270bf351eba
* gnus-start.el (gnus-read-init-file): Cleaned up.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
38627
diff
changeset
|
506 (condition-case var |
2270bf351eba
* gnus-start.el (gnus-read-init-file): Cleaned up.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
38627
diff
changeset
|
507 (load file nil t) |
2270bf351eba
* gnus-start.el (gnus-read-init-file): Cleaned up.
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
38627
diff
changeset
|
508 (error |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
509 (error "Error in %s: %s" file (cadr var)))))))))) |
17493 | 510 |
511 ;; For subscribing new newsgroup | |
512 | |
513 (defun gnus-subscribe-hierarchical-interactive (groups) | |
514 (let ((groups (sort groups 'string<)) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
515 prefixes prefix start ans group starts real-group) |
17493 | 516 (while groups |
517 (setq prefixes (list "^")) | |
518 (while (and groups prefixes) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
519 (while (not (string-match (car prefixes) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
520 (gnus-group-real-name (car groups)))) |
17493 | 521 (setq prefixes (cdr prefixes))) |
522 (setq prefix (car prefixes)) | |
523 (setq start (1- (length prefix))) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
524 (if (and (string-match "[^\\.]\\." (gnus-group-real-name (car groups)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
525 start) |
17493 | 526 (cdr groups) |
527 (setq prefix | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
528 (concat "^" (substring |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
529 (gnus-group-real-name (car groups)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
530 0 (match-end 0)))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
531 (string-match prefix (gnus-group-real-name (cadr groups)))) |
17493 | 532 (progn |
533 (push prefix prefixes) | |
534 (message "Descend hierarchy %s? ([y]nsq): " | |
535 (substring prefix 1 (1- (length prefix)))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
536 (while (not (memq (setq ans (read-char-exclusive)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
537 '(?y ?\n ?\r ?n ?s ?q))) |
17493 | 538 (ding) |
539 (message "Descend hierarchy %s? ([y]nsq): " | |
540 (substring prefix 1 (1- (length prefix))))) | |
541 (cond ((= ans ?n) | |
542 (while (and groups | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
543 (setq group (car groups) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
544 real-group (gnus-group-real-name group)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
545 (string-match prefix real-group)) |
17493 | 546 (push group gnus-killed-list) |
547 (gnus-sethash group group gnus-killed-hashtb) | |
548 (setq groups (cdr groups))) | |
549 (setq starts (cdr starts))) | |
550 ((= ans ?s) | |
551 (while (and groups | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
552 (setq group (car groups) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
553 real-group (gnus-group-real-name group)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
554 (string-match prefix real-group)) |
17493 | 555 (gnus-sethash group group gnus-killed-hashtb) |
556 (gnus-subscribe-alphabetically (car groups)) | |
557 (setq groups (cdr groups))) | |
558 (setq starts (cdr starts))) | |
559 ((= ans ?q) | |
560 (while groups | |
561 (setq group (car groups)) | |
562 (push group gnus-killed-list) | |
563 (gnus-sethash group group gnus-killed-hashtb) | |
564 (setq groups (cdr groups)))) | |
565 (t nil))) | |
566 (message "Subscribe %s? ([n]yq)" (car groups)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
567 (while (not (memq (setq ans (read-char-exclusive)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
568 '(?y ?\n ?\r ?q ?n))) |
17493 | 569 (ding) |
570 (message "Subscribe %s? ([n]yq)" (car groups))) | |
571 (setq group (car groups)) | |
572 (cond ((= ans ?y) | |
573 (gnus-subscribe-alphabetically (car groups)) | |
574 (gnus-sethash group group gnus-killed-hashtb)) | |
575 ((= ans ?q) | |
576 (while groups | |
577 (setq group (car groups)) | |
578 (push group gnus-killed-list) | |
579 (gnus-sethash group group gnus-killed-hashtb) | |
580 (setq groups (cdr groups)))) | |
581 (t | |
582 (push group gnus-killed-list) | |
583 (gnus-sethash group group gnus-killed-hashtb))) | |
584 (setq groups (cdr groups))))))) | |
585 | |
586 (defun gnus-subscribe-randomly (newsgroup) | |
587 "Subscribe new NEWSGROUP by making it the first newsgroup." | |
588 (gnus-subscribe-newsgroup newsgroup)) | |
589 | |
590 (defun gnus-subscribe-alphabetically (newgroup) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
591 "Subscribe new NEWGROUP and insert it in alphabetical order." |
17493 | 592 (let ((groups (cdr gnus-newsrc-alist)) |
593 before) | |
594 (while (and (not before) groups) | |
595 (if (string< newgroup (caar groups)) | |
596 (setq before (caar groups)) | |
597 (setq groups (cdr groups)))) | |
598 (gnus-subscribe-newsgroup newgroup before))) | |
599 | |
600 (defun gnus-subscribe-hierarchically (newgroup) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
601 "Subscribe new NEWGROUP and insert it in hierarchical newsgroup order." |
17493 | 602 ;; Basic ideas by mike-w@cs.aukuni.ac.nz (Mike Williams) |
110410
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
603 (with-current-buffer (nnheader-find-file-noselect gnus-current-startup-file) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
604 (prog1 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
605 (let ((groupkey newgroup) before) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
606 (while (and (not before) groupkey) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
607 (goto-char (point-min)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
608 (let ((groupkey-re |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
609 (concat "^\\(" (regexp-quote groupkey) ".*\\)[!:]"))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
610 (while (and (re-search-forward groupkey-re nil t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
611 (progn |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
612 (setq before (match-string 1)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
613 (string< before newgroup))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
614 ;; Remove tail of newsgroup name (eg. a.b.c -> a.b) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
615 (setq groupkey |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
616 (when (string-match "^\\(.*\\)\\.[^.]+$" groupkey) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
617 (substring groupkey (match-beginning 1) (match-end 1))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
618 (gnus-subscribe-newsgroup newgroup before)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
619 (kill-buffer (current-buffer))))) |
17493 | 620 |
621 (defun gnus-subscribe-interactively (group) | |
622 "Subscribe the new GROUP interactively. | |
623 It is inserted in hierarchical newsgroup order if subscribed. If not, | |
624 it is killed." | |
65688
41260182da5b
2005-09-25 Romain Francoise <romain@orebokech.com>
Romain Francoise <romain@orebokech.com>
parents:
64754
diff
changeset
|
625 (if (gnus-y-or-n-p (format "Subscribe new newsgroup %s? " group)) |
17493 | 626 (gnus-subscribe-hierarchically group) |
627 (push group gnus-killed-list))) | |
628 | |
629 (defun gnus-subscribe-zombies (group) | |
630 "Make the new GROUP into a zombie group." | |
631 (push group gnus-zombie-list)) | |
632 | |
633 (defun gnus-subscribe-killed (group) | |
634 "Make the new GROUP a killed group." | |
635 (push group gnus-killed-list)) | |
636 | |
637 (defun gnus-subscribe-newsgroup (newsgroup &optional next) | |
638 "Subscribe new NEWSGROUP. | |
74149
1bf9e5a9c07a
(gnus-options-subscribe, gnus-options-not-subscribe, gnus-subscribe-newsgroup,
Juanma Barranquero <lekktu@gmail.com>
parents:
71884
diff
changeset
|
639 If NEXT is non-nil, it is inserted before NEXT. Otherwise it is made |
17493 | 640 the first newsgroup." |
641 (save-excursion | |
642 (goto-char (point-min)) | |
643 ;; We subscribe the group by changing its level to `subscribed'. | |
644 (gnus-group-change-level | |
645 newsgroup gnus-level-default-subscribed | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
646 gnus-level-killed (gnus-group-entry (or next "dummy.group"))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
647 (gnus-message 5 "Subscribe newsgroup: %s" newsgroup) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
648 (run-hook-with-args 'gnus-subscribe-newsgroup-hooks newsgroup) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
649 t)) |
17493 | 650 |
651 (defun gnus-read-active-file-p () | |
652 "Say whether the active file has been read from `gnus-select-method'." | |
653 (memq gnus-select-method gnus-have-read-active-file)) | |
654 | |
655 ;;; General various misc type functions. | |
656 | |
657 ;; Silence byte-compiler. | |
86154 | 658 (defvar gnus-current-headers) |
659 (defvar gnus-thread-indent-array) | |
660 (defvar gnus-newsgroup-name) | |
661 (defvar gnus-newsgroup-headers) | |
662 (defvar gnus-group-list-mode) | |
663 (defvar gnus-group-mark-positions) | |
664 (defvar gnus-newsgroup-data) | |
665 (defvar gnus-newsgroup-unreads) | |
666 (defvar nnoo-state-alist) | |
667 (defvar gnus-current-select-method) | |
668 (defvar mail-sources) | |
669 (defvar nnmail-scan-directory-mail-source-once) | |
670 (defvar nnmail-split-history) | |
671 (defvar nnmail-spool-file) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
672 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
673 (defun gnus-close-all-servers () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
674 "Close all servers." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
675 (interactive) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
676 (dolist (server gnus-opened-servers) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
677 (gnus-close-server (car server)))) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
678 |
17493 | 679 (defun gnus-clear-system () |
680 "Clear all variables and buffers." | |
681 ;; Clear Gnus variables. | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
682 (let ((variables (remove 'gnus-format-specs gnus-variable-list))) |
17493 | 683 (while variables |
684 (set (car variables) nil) | |
685 (setq variables (cdr variables)))) | |
686 ;; Clear other internal variables. | |
687 (setq gnus-list-of-killed-groups nil | |
688 gnus-have-read-active-file nil | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
689 gnus-agent-covered-methods nil |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
690 gnus-agent-file-loading-local nil |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
691 gnus-agent-file-loading-cache nil |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
692 gnus-server-method-cache nil |
17493 | 693 gnus-newsrc-alist nil |
694 gnus-newsrc-hashtb nil | |
695 gnus-killed-list nil | |
696 gnus-zombie-list nil | |
697 gnus-killed-hashtb nil | |
698 gnus-active-hashtb nil | |
699 gnus-moderated-hashtb nil | |
700 gnus-description-hashtb nil | |
701 gnus-current-headers nil | |
702 gnus-thread-indent-array nil | |
703 gnus-newsgroup-headers nil | |
704 gnus-newsgroup-name nil | |
705 gnus-server-alist nil | |
706 gnus-group-list-mode nil | |
707 gnus-opened-servers nil | |
708 gnus-group-mark-positions nil | |
709 gnus-newsgroup-data nil | |
710 gnus-newsgroup-unreads nil | |
711 nnoo-state-alist nil | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
712 gnus-current-select-method nil |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
713 nnmail-split-history nil |
110465
b7b7e970d807
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110433
diff
changeset
|
714 gnus-extended-servers nil |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
715 gnus-ephemeral-servers nil) |
17493 | 716 (gnus-shutdown 'gnus) |
717 ;; Kill the startup file. | |
718 (and gnus-current-startup-file | |
719 (get-file-buffer gnus-current-startup-file) | |
720 (kill-buffer (get-file-buffer gnus-current-startup-file))) | |
721 ;; Clear the dribble buffer. | |
722 (gnus-dribble-clear) | |
723 ;; Kill global KILL file buffer. | |
724 (when (get-file-buffer (gnus-newsgroup-kill-file nil)) | |
725 (kill-buffer (get-file-buffer (gnus-newsgroup-kill-file nil)))) | |
726 (gnus-kill-buffer nntp-server-buffer) | |
727 ;; Kill Gnus buffers. | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
728 (dolist (buffer (gnus-buffers)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
729 (gnus-kill-buffer buffer)) |
17493 | 730 ;; Remove Gnus frames. |
731 (gnus-kill-gnus-frames)) | |
732 | |
733 (defun gnus-no-server-1 (&optional arg slave) | |
734 "Read network news. | |
67643
1c477099d3ac
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-676
Miles Bader <miles@gnu.org>
parents:
67418
diff
changeset
|
735 If ARG is a positive number, Gnus will use that as the startup |
1c477099d3ac
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-676
Miles Bader <miles@gnu.org>
parents:
67418
diff
changeset
|
736 level. If ARG is nil, Gnus will be started at level 2 |
1c477099d3ac
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-676
Miles Bader <miles@gnu.org>
parents:
67418
diff
changeset
|
737 \(`gnus-level-default-subscribed' minus one). If ARG is non-nil |
1c477099d3ac
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-676
Miles Bader <miles@gnu.org>
parents:
67418
diff
changeset
|
738 and not a positive number, Gnus will prompt the user for the name |
1c477099d3ac
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-676
Miles Bader <miles@gnu.org>
parents:
67418
diff
changeset
|
739 of an NNTP server to use. As opposed to \\[gnus], this command |
1c477099d3ac
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-676
Miles Bader <miles@gnu.org>
parents:
67418
diff
changeset
|
740 will not connect to the local server." |
17493 | 741 (interactive "P") |
742 (let ((val (or arg (1- gnus-level-default-subscribed)))) | |
743 (gnus val t slave) | |
744 (make-local-variable 'gnus-group-use-permanent-levels) | |
745 (setq gnus-group-use-permanent-levels val))) | |
746 | |
747 (defun gnus-1 (&optional arg dont-connect slave) | |
748 "Read network news. | |
749 If ARG is non-nil and a positive number, Gnus will use that as the | |
74149
1bf9e5a9c07a
(gnus-options-subscribe, gnus-options-not-subscribe, gnus-subscribe-newsgroup,
Juanma Barranquero <lekktu@gmail.com>
parents:
71884
diff
changeset
|
750 startup level. If ARG is non-nil and not a positive number, Gnus will |
17493 | 751 prompt the user for the name of an NNTP server to use." |
752 (interactive "P") | |
753 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
754 (if (gnus-alive-p) |
17493 | 755 (progn |
756 (switch-to-buffer gnus-group-buffer) | |
757 (gnus-group-get-new-news | |
758 (and (numberp arg) | |
759 (> arg 0) | |
760 (max (car gnus-group-list-mode) arg)))) | |
761 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
762 (gnus-clear-system) |
17493 | 763 (gnus-splash) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
764 (gnus-run-hooks 'gnus-before-startup-hook) |
17493 | 765 (nnheader-init-server-buffer) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19910
diff
changeset
|
766 (setq gnus-slave slave) |
17493 | 767 (gnus-read-init-file) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
768 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
769 ;; Add "native" to gnus-predefined-server-alist just to have a |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
770 ;; name for the native select method. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
771 (when gnus-select-method |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
772 (push (cons "native" gnus-select-method) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
773 gnus-predefined-server-alist)) |
110111
5b9f64b04a04
Delete all trailing white space.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110102
diff
changeset
|
774 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
775 (if gnus-agent |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
776 (gnus-agentize)) |
17493 | 777 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
778 (when gnus-simple-splash |
17493 | 779 (setq gnus-simple-splash nil) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
780 (cond |
32939
c8119677d63e
Use (featurep 'xemacs) instead of the `gnus-xemacs' variable, as the
Miles Bader <miles@gnu.org>
parents:
31783
diff
changeset
|
781 ((featurep 'xemacs) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
782 (gnus-xmas-splash)) |
78006 | 783 (window-system |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
784 (gnus-x-splash)))) |
17493 | 785 |
786 (let ((level (and (numberp arg) (> arg 0) arg)) | |
787 did-connect) | |
788 (unwind-protect | |
789 (progn | |
790 (unless dont-connect | |
791 (setq did-connect | |
792 (gnus-start-news-server (and arg (not level)))))) | |
793 (if (and (not dont-connect) | |
794 (not did-connect)) | |
795 (gnus-group-quit) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
796 (gnus-run-hooks 'gnus-startup-hook) |
17493 | 797 ;; NNTP server is successfully open. |
798 | |
799 ;; Find the current startup file name. | |
800 (setq gnus-current-startup-file | |
801 (gnus-make-newsrc-file gnus-startup-file)) | |
802 | |
803 ;; Read the dribble file. | |
804 (when (or gnus-slave gnus-use-dribble-file) | |
805 (gnus-dribble-read-file)) | |
806 | |
807 ;; Do the actual startup. | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
808 (if gnus-agent |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
809 (gnus-request-create-group "queue" '(nndraft ""))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
810 (gnus-request-create-group "drafts" '(nndraft "")) |
17493 | 811 (gnus-setup-news nil level dont-connect) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
812 (gnus-run-hooks 'gnus-setup-news-hook) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
813 (gnus-start-draft-setup) |
17493 | 814 ;; Generate the group buffer. |
815 (gnus-group-list-groups level) | |
816 (gnus-group-first-unread-group) | |
817 (gnus-configure-windows 'group) | |
818 (gnus-group-set-mode-line) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
819 (gnus-run-hooks 'gnus-started-hook)))))) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
820 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
821 (defun gnus-start-draft-setup () |
109799
5cc3b1a56d3e
gnus-start-draft-setup: Move doc string forward.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
109763
diff
changeset
|
822 "Make sure the draft group exists." |
109763
410b495bd9be
Make gnus-start-draft-setup interactive.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
108724
diff
changeset
|
823 (interactive) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
824 (gnus-request-create-group "drafts" '(nndraft "")) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
825 (unless (gnus-group-entry "nndraft:drafts") |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
826 (let ((gnus-level-default-subscribed 1)) |
67643
1c477099d3ac
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-676
Miles Bader <miles@gnu.org>
parents:
67418
diff
changeset
|
827 (gnus-subscribe-group "nndraft:drafts" nil '(nndraft "")))) |
1c477099d3ac
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-676
Miles Bader <miles@gnu.org>
parents:
67418
diff
changeset
|
828 (unless (equal (gnus-group-get-parameter "nndraft:drafts" 'gnus-dummy t) |
1c477099d3ac
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-676
Miles Bader <miles@gnu.org>
parents:
67418
diff
changeset
|
829 '((gnus-draft-mode))) |
1c477099d3ac
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-676
Miles Bader <miles@gnu.org>
parents:
67418
diff
changeset
|
830 (gnus-message 3 "Setting up drafts group") |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
831 (gnus-group-set-parameter |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
832 "nndraft:drafts" 'gnus-dummy '((gnus-draft-mode))))) |
17493 | 833 |
834 | |
835 ;;; | |
836 ;;; Dribble file | |
837 ;;; | |
838 | |
839 (defvar gnus-dribble-ignore nil) | |
840 (defvar gnus-dribble-eval-file nil) | |
841 | |
842 (defun gnus-dribble-file-name () | |
843 "Return the dribble file for the current .newsrc." | |
844 (concat | |
845 (if gnus-dribble-directory | |
846 (concat (file-name-as-directory gnus-dribble-directory) | |
847 (file-name-nondirectory gnus-current-startup-file)) | |
848 gnus-current-startup-file) | |
849 "-dribble")) | |
850 | |
851 (defun gnus-dribble-enter (string) | |
852 "Enter STRING into the dribble buffer." | |
853 (when (and (not gnus-dribble-ignore) | |
854 gnus-dribble-buffer | |
855 (buffer-name gnus-dribble-buffer)) | |
856 (let ((obuf (current-buffer))) | |
857 (set-buffer gnus-dribble-buffer) | |
858 (goto-char (point-max)) | |
859 (insert string "\n") | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
860 ;; This has been commented by Josh Huber <huber@alum.wpi.edu> |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
861 ;; It causes problems with both XEmacs and Emacs 21, and doesn't |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
862 ;; seem to be of much value. (FIXME: remove this after we make sure |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
863 ;; it's not needed). |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
864 ;; (set-window-point (get-buffer-window (current-buffer)) (point-max)) |
17493 | 865 (bury-buffer gnus-dribble-buffer) |
110410
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
866 (with-current-buffer gnus-group-buffer |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
867 (gnus-group-set-mode-line)) |
17493 | 868 (set-buffer obuf)))) |
869 | |
870 (defun gnus-dribble-touch () | |
871 "Touch the dribble buffer." | |
872 (gnus-dribble-enter "")) | |
873 | |
874 (defun gnus-dribble-read-file () | |
875 "Read the dribble file from disk." | |
876 (let ((dribble-file (gnus-dribble-file-name))) | |
110027
9604de1a8d28
Misc Gnus fixes by Lars Magne Ingebrigtsen <larsi@gnus.org>.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
109799
diff
changeset
|
877 (unless (file-exists-p (file-name-directory dribble-file)) |
9604de1a8d28
Misc Gnus fixes by Lars Magne Ingebrigtsen <larsi@gnus.org>.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
109799
diff
changeset
|
878 (make-directory (file-name-directory dribble-file) t)) |
110410
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
879 (with-current-buffer (setq gnus-dribble-buffer |
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
880 (gnus-get-buffer-create |
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
881 (file-name-nondirectory dribble-file))) |
67418
28264c86d408
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-668
Miles Bader <miles@gnu.org>
parents:
65688
diff
changeset
|
882 (set (make-local-variable 'file-precious-flag) t) |
17493 | 883 (erase-buffer) |
884 (setq buffer-file-name dribble-file) | |
885 (auto-save-mode t) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
886 (buffer-disable-undo) |
17493 | 887 (bury-buffer (current-buffer)) |
888 (set-buffer-modified-p nil) | |
889 (let ((auto (make-auto-save-file-name)) | |
890 (gnus-dribble-ignore t) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
891 (purpose nil) |
17493 | 892 modes) |
893 (when (or (file-exists-p auto) (file-exists-p dribble-file)) | |
894 ;; Load whichever file is newest -- the auto save file | |
895 ;; or the "real" file. | |
896 (if (file-newer-than-file-p auto dribble-file) | |
897 (nnheader-insert-file-contents auto) | |
898 (nnheader-insert-file-contents dribble-file)) | |
899 (unless (zerop (buffer-size)) | |
900 (set-buffer-modified-p t)) | |
901 ;; Set the file modes to reflect the .newsrc file modes. | |
902 (save-buffer) | |
903 (when (and (file-exists-p gnus-current-startup-file) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19910
diff
changeset
|
904 (file-exists-p dribble-file) |
17493 | 905 (setq modes (file-modes gnus-current-startup-file))) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
906 (gnus-set-file-modes dribble-file modes)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
907 (goto-char (point-min)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
908 (when (search-forward "Gnus was exited on purpose" nil t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
909 (setq purpose t)) |
17493 | 910 ;; Possibly eval the file later. |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
911 (when (or gnus-always-read-dribble-file |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
912 (gnus-y-or-n-p |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
913 (if purpose |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
914 "Gnus exited on purpose without saving; read auto-save file anyway? " |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
915 "Gnus auto-save file exists. Do you want to read it? "))) |
17493 | 916 (setq gnus-dribble-eval-file t))))))) |
917 | |
918 (defun gnus-dribble-eval-file () | |
919 (when gnus-dribble-eval-file | |
920 (setq gnus-dribble-eval-file nil) | |
921 (save-excursion | |
922 (let ((gnus-dribble-ignore t)) | |
923 (set-buffer gnus-dribble-buffer) | |
924 (eval-buffer (current-buffer)))))) | |
925 | |
926 (defun gnus-dribble-delete-file () | |
927 (when (file-exists-p (gnus-dribble-file-name)) | |
928 (delete-file (gnus-dribble-file-name))) | |
929 (when gnus-dribble-buffer | |
110410
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
930 (with-current-buffer gnus-dribble-buffer |
17493 | 931 (let ((auto (make-auto-save-file-name))) |
932 (when (file-exists-p auto) | |
933 (delete-file auto)) | |
934 (erase-buffer) | |
935 (set-buffer-modified-p nil))))) | |
936 | |
937 (defun gnus-dribble-save () | |
938 (when (and gnus-dribble-buffer | |
939 (buffer-name gnus-dribble-buffer)) | |
110410
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
940 (with-current-buffer gnus-dribble-buffer |
17493 | 941 (save-buffer)))) |
942 | |
943 (defun gnus-dribble-clear () | |
944 (when (gnus-buffer-exists-p gnus-dribble-buffer) | |
110410
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
945 (with-current-buffer gnus-dribble-buffer |
17493 | 946 (erase-buffer) |
947 (set-buffer-modified-p nil) | |
948 (setq buffer-saved-size (buffer-size))))) | |
949 | |
950 | |
951 ;;; | |
952 ;;; Active & Newsrc File Handling | |
953 ;;; | |
954 | |
955 (defun gnus-setup-news (&optional rawfile level dont-connect) | |
956 "Setup news information. | |
957 If RAWFILE is non-nil, the .newsrc file will also be read. | |
958 If LEVEL is non-nil, the news will be set up at level LEVEL." | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
959 (require 'nnmail) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
960 (let ((init (not (and gnus-newsrc-alist gnus-active-hashtb (not rawfile)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
961 ;; Binding this variable will inhibit multiple fetchings |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
962 ;; of the same mail source. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
963 (nnmail-fetched-sources (list t))) |
17493 | 964 |
965 (when init | |
966 ;; Clear some variables to re-initialize news information. | |
967 (setq gnus-newsrc-alist nil | |
968 gnus-active-hashtb nil) | |
969 ;; Read the newsrc file and create `gnus-newsrc-hashtb'. | |
970 (gnus-read-newsrc-file rawfile)) | |
971 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
972 ;; Make sure the archive server is available to all and sundry. |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
973 (let ((method (or (and (stringp gnus-message-archive-method) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
974 (gnus-server-to-method |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
975 gnus-message-archive-method)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
976 gnus-message-archive-method))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
977 ;; Check whether the archive method is writable. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
978 (unless (or (not method) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
979 (stringp method) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
980 (memq 'respool (assoc (format "%s" (car method)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
981 gnus-valid-select-methods))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
982 (setq method "archive")) ;; The default. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
983 (when (stringp method) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
984 (setq method `(nnfolder |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
985 ,method |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
986 (nnfolder-directory |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
987 ,(nnheader-concat message-directory method)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
988 (nnfolder-active-file |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
989 ,(nnheader-concat message-directory |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
990 (concat method "/active"))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
991 (nnfolder-get-new-mail nil) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
992 (nnfolder-inhibit-expiry t)))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
993 (if (assoc "archive" gnus-server-alist) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
994 (when gnus-update-message-archive-method |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
995 (if method |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
996 (setcdr (assoc "archive" gnus-server-alist) method) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
997 (setq gnus-server-alist (delq (assoc "archive" gnus-server-alist) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
998 gnus-server-alist)))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
999 (when method |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1000 (push (cons "archive" method) gnus-server-alist)))) |
17493 | 1001 |
1002 ;; If we don't read the complete active file, we fill in the | |
1003 ;; hashtb here. | |
1004 (when (or (null gnus-read-active-file) | |
1005 (eq gnus-read-active-file 'some)) | |
1006 (gnus-update-active-hashtb-from-killed)) | |
1007 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1008 ;; Validate agent covered methods now that gnus-server-alist has |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1009 ;; been initialized. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1010 ;; NOTE: This is here for one purpose only. By validating the |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1011 ;; agentized server's, it converts the old 5.10.3, and earlier, |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1012 ;; format to the current format. That enables the agent code |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1013 ;; within gnus-read-active-file to function correctly. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1014 (if gnus-agent |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1015 (gnus-agent-read-servers-validate)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1016 |
17493 | 1017 ;; Read the active file and create `gnus-active-hashtb'. |
1018 ;; If `gnus-read-active-file' is nil, then we just create an empty | |
1019 ;; hash table. The partial filling out of the hash table will be | |
1020 ;; done in `gnus-get-unread-articles'. | |
1021 (and gnus-read-active-file | |
1022 (not level) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19910
diff
changeset
|
1023 (gnus-read-active-file nil dont-connect)) |
17493 | 1024 |
1025 (unless gnus-active-hashtb | |
1026 (setq gnus-active-hashtb (gnus-make-hashtable 4096))) | |
1027 | |
1028 ;; Initialize the cache. | |
1029 (when gnus-use-cache | |
1030 (gnus-cache-open)) | |
1031 | |
1032 ;; Possibly eval the dribble file. | |
1033 (and init | |
1034 (or gnus-use-dribble-file gnus-slave) | |
1035 (gnus-dribble-eval-file)) | |
1036 | |
1037 ;; Slave Gnusii should then clear the dribble buffer. | |
1038 (when (and init gnus-slave) | |
1039 (gnus-dribble-clear)) | |
1040 | |
1041 (gnus-update-format-specifications) | |
1042 | |
1043 ;; See whether we need to read the description file. | |
1044 (when (and (boundp 'gnus-group-line-format) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1045 (stringp gnus-group-line-format) |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19910
diff
changeset
|
1046 (let ((case-fold-search nil)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19910
diff
changeset
|
1047 (string-match "%[-,0-9]*D" gnus-group-line-format)) |
17493 | 1048 (not gnus-description-hashtb) |
1049 (not dont-connect) | |
1050 gnus-read-active-file) | |
1051 (gnus-read-all-descriptions-files)) | |
1052 | |
1053 ;; Find new newsgroups and treat them. | |
1054 (when (and init gnus-check-new-newsgroups (not level) | |
1055 (gnus-check-server gnus-select-method) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
1056 (not gnus-slave) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
1057 gnus-plugged) |
17493 | 1058 (gnus-find-new-newsgroups)) |
1059 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1060 ;; Check and remove bogus newsgroups. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1061 (when (and init gnus-check-bogus-newsgroups |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1062 gnus-read-active-file (not level) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1063 (gnus-server-opened gnus-select-method)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1064 (gnus-check-bogus-newsgroups)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1065 |
17493 | 1066 ;; Read any slave files. |
1067 (gnus-master-read-slave-newsrc) | |
1068 | |
1069 ;; Find the number of unread articles in each non-dead group. | |
1070 (let ((gnus-read-active-file (and (not level) gnus-read-active-file))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1071 (gnus-get-unread-articles level)))) |
17493 | 1072 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1073 (defun gnus-call-subscribe-functions (method group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1074 "Call METHOD to subscribe GROUP. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1075 If no function returns `non-nil', call `gnus-subscribe-zombies'." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1076 (unless (cond |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1077 ((functionp method) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1078 (funcall method group)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1079 ((listp method) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1080 (catch 'found |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1081 (dolist (func method) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1082 (if (funcall func group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1083 (throw 'found t))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1084 nil)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1085 (t nil)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1086 (gnus-subscribe-zombies group))) |
17493 | 1087 |
1088 (defun gnus-find-new-newsgroups (&optional arg) | |
1089 "Search for new newsgroups and add them. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1090 Each new newsgroup will be treated with `gnus-subscribe-newsgroup-method'. |
17493 | 1091 The `-n' option line from .newsrc is respected. |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
1092 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
1093 With 1 C-u, use the `ask-server' method to query the server for new |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
1094 groups. |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
1095 With 2 C-u's, use most complete method possible to query the server |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
1096 for new groups, and subscribe the new groups as zombies." |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
1097 (interactive "p") |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
1098 (let* ((gnus-subscribe-newsgroup-method |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
1099 gnus-subscribe-newsgroup-method) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
1100 (check (cond |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1101 ((or (and (= (or arg 1) 4) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1102 (not (listp gnus-check-new-newsgroups))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1103 (null gnus-read-active-file) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1104 (eq gnus-read-active-file 'some)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1105 'ask-server) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1106 ((= (or arg 1) 16) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1107 (setq gnus-subscribe-newsgroup-method |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1108 'gnus-subscribe-zombies) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1109 t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1110 (t gnus-check-new-newsgroups)))) |
17493 | 1111 (unless (gnus-check-first-time-used) |
1112 (if (or (consp check) | |
1113 (eq check 'ask-server)) | |
1114 ;; Ask the server for new groups. | |
1115 (gnus-ask-server-for-new-groups) | |
1116 ;; Go through the active hashtb and look for new groups. | |
1117 (let ((groups 0) | |
1118 group new-newsgroups) | |
1119 (gnus-message 5 "Looking for new newsgroups...") | |
1120 (unless gnus-have-read-active-file | |
1121 (gnus-read-active-file)) | |
38526
98b3bb015deb
(gnus-find-new-newsgroups): Use
Gerd Moellmann <gerd@gnu.org>
parents:
33396
diff
changeset
|
1122 (setq gnus-newsrc-last-checked-date (message-make-date)) |
17493 | 1123 (unless gnus-killed-hashtb |
1124 (gnus-make-hashtable-from-killed)) | |
1125 ;; Go though every newsgroup in `gnus-active-hashtb' and compare | |
1126 ;; with `gnus-newsrc-hashtb' and `gnus-killed-hashtb'. | |
1127 (mapatoms | |
1128 (lambda (sym) | |
1129 (if (or (null (setq group (symbol-name sym))) | |
1130 (not (boundp sym)) | |
1131 (null (symbol-value sym)) | |
1132 (gnus-gethash group gnus-killed-hashtb) | |
1133 (gnus-gethash group gnus-newsrc-hashtb)) | |
1134 () | |
1135 (let ((do-sub (gnus-matches-options-n group))) | |
1136 (cond | |
1137 ((eq do-sub 'subscribe) | |
1138 (setq groups (1+ groups)) | |
1139 (gnus-sethash group group gnus-killed-hashtb) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1140 (gnus-call-subscribe-functions |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1141 gnus-subscribe-options-newsgroup-method group)) |
17493 | 1142 ((eq do-sub 'ignore) |
1143 nil) | |
1144 (t | |
1145 (setq groups (1+ groups)) | |
1146 (gnus-sethash group group gnus-killed-hashtb) | |
1147 (if gnus-subscribe-hierarchical-interactive | |
1148 (push group new-newsgroups) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1149 (gnus-call-subscribe-functions |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1150 gnus-subscribe-newsgroup-method group))))))) |
17493 | 1151 gnus-active-hashtb) |
1152 (when new-newsgroups | |
1153 (gnus-subscribe-hierarchical-interactive new-newsgroups)) | |
1154 (if (> groups 0) | |
1155 (gnus-message 5 "%d new newsgroup%s arrived." | |
1156 groups (if (> groups 1) "s have" " has")) | |
1157 (gnus-message 5 "No new newsgroups."))))))) | |
1158 | |
1159 (defun gnus-matches-options-n (group) | |
1160 ;; Returns `subscribe' if the group is to be unconditionally | |
1161 ;; subscribed, `ignore' if it is to be ignored, and nil if there is | |
1162 ;; no match for the group. | |
1163 | |
1164 ;; First we check the two user variables. | |
1165 (cond | |
1166 ((and gnus-options-subscribe | |
1167 (string-match gnus-options-subscribe group)) | |
1168 'subscribe) | |
1169 ((and gnus-auto-subscribed-groups | |
1170 (string-match gnus-auto-subscribed-groups group)) | |
1171 'subscribe) | |
1172 ((and gnus-options-not-subscribe | |
1173 (string-match gnus-options-not-subscribe group)) | |
1174 'ignore) | |
1175 ;; Then we go through the list that was retrieved from the .newsrc | |
1176 ;; file. This list has elements on the form | |
1177 ;; `(REGEXP . {ignore,subscribe})'. The first match found (the list | |
1178 ;; is in the reverse order of the options line) is returned. | |
1179 (t | |
1180 (let ((regs gnus-newsrc-options-n)) | |
1181 (while (and regs | |
1182 (not (string-match (caar regs) group))) | |
1183 (setq regs (cdr regs))) | |
1184 (and regs (cdar regs)))))) | |
1185 | |
1186 (defun gnus-ask-server-for-new-groups () | |
38526
98b3bb015deb
(gnus-find-new-newsgroups): Use
Gerd Moellmann <gerd@gnu.org>
parents:
33396
diff
changeset
|
1187 (let* ((new-date (message-make-date)) |
98b3bb015deb
(gnus-find-new-newsgroups): Use
Gerd Moellmann <gerd@gnu.org>
parents:
33396
diff
changeset
|
1188 (date (or gnus-newsrc-last-checked-date new-date)) |
17493 | 1189 (methods (cons gnus-select-method |
1190 (nconc | |
1191 (when (gnus-archive-server-wanted-p) | |
1192 (list "archive")) | |
1193 (append | |
1194 (and (consp gnus-check-new-newsgroups) | |
1195 gnus-check-new-newsgroups) | |
1196 gnus-secondary-select-methods)))) | |
1197 (groups 0) | |
1198 group new-newsgroups got-new method hashtb | |
1199 gnus-override-subscribe-method) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
1200 (unless gnus-killed-hashtb |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
1201 (gnus-make-hashtable-from-killed)) |
17493 | 1202 ;; Go through both primary and secondary select methods and |
1203 ;; request new newsgroups. | |
1204 (while (setq method (gnus-server-get-method nil (pop methods))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
1205 (setq new-newsgroups nil |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
1206 gnus-override-subscribe-method method) |
17493 | 1207 (when (and (gnus-check-server method) |
1208 (gnus-request-newgroups date method)) | |
1209 (save-excursion | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
1210 (setq got-new t |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
1211 hashtb (gnus-make-hashtable 100)) |
17493 | 1212 (set-buffer nntp-server-buffer) |
1213 ;; Enter all the new groups into a hashtable. | |
1214 (gnus-active-to-gnus-format method hashtb 'ignore)) | |
1215 ;; Now all new groups from `method' are in `hashtb'. | |
1216 (mapatoms | |
1217 (lambda (group-sym) | |
1218 (if (or (null (setq group (symbol-name group-sym))) | |
1219 (not (boundp group-sym)) | |
1220 (null (symbol-value group-sym)) | |
1221 (gnus-gethash group gnus-newsrc-hashtb) | |
1222 (member group gnus-zombie-list) | |
1223 (member group gnus-killed-list)) | |
1224 ;; The group is already known. | |
1225 () | |
1226 ;; Make this group active. | |
1227 (when (symbol-value group-sym) | |
1228 (gnus-set-active group (symbol-value group-sym))) | |
1229 ;; Check whether we want it or not. | |
1230 (let ((do-sub (gnus-matches-options-n group))) | |
1231 (cond | |
1232 ((eq do-sub 'subscribe) | |
1233 (incf groups) | |
1234 (gnus-sethash group group gnus-killed-hashtb) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1235 (gnus-call-subscribe-functions |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1236 gnus-subscribe-options-newsgroup-method group)) |
17493 | 1237 ((eq do-sub 'ignore) |
1238 nil) | |
1239 (t | |
1240 (incf groups) | |
1241 (gnus-sethash group group gnus-killed-hashtb) | |
1242 (if gnus-subscribe-hierarchical-interactive | |
1243 (push group new-newsgroups) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1244 (gnus-call-subscribe-functions |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1245 gnus-subscribe-newsgroup-method group))))))) |
17493 | 1246 hashtb)) |
1247 (when new-newsgroups | |
1248 (gnus-subscribe-hierarchical-interactive new-newsgroups))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1249 (if (> groups 0) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1250 (gnus-message 5 "%d new newsgroup%s arrived" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1251 groups (if (> groups 1) "s have" " has")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1252 (gnus-message 5 "No new newsgroups")) |
17493 | 1253 (when got-new |
1254 (setq gnus-newsrc-last-checked-date new-date)) | |
1255 got-new)) | |
1256 | |
1257 (defun gnus-check-first-time-used () | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1258 (catch 'ended |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1259 ;; First check if any of the following files exist. If they do, |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1260 ;; it's not the first time the user has used Gnus. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1261 (dolist (file (list (concat gnus-current-startup-file ".el") |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1262 (concat gnus-current-startup-file ".eld") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1263 (concat gnus-startup-file ".el") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1264 (concat gnus-startup-file ".eld"))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1265 (when (file-exists-p file) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1266 (throw 'ended nil))) |
17493 | 1267 (gnus-message 6 "First time user; subscribing you to default groups") |
1268 (unless (gnus-read-active-file-p) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19910
diff
changeset
|
1269 (let ((gnus-read-active-file t)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19910
diff
changeset
|
1270 (gnus-read-active-file))) |
38526
98b3bb015deb
(gnus-find-new-newsgroups): Use
Gerd Moellmann <gerd@gnu.org>
parents:
33396
diff
changeset
|
1271 (setq gnus-newsrc-last-checked-date (message-make-date)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1272 ;; Subscribe to the default newsgroups. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1273 (let ((groups (or gnus-default-subscribed-newsgroups |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1274 gnus-backup-default-subscribed-newsgroups)) |
17493 | 1275 group) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1276 (if (eq groups t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1277 ;; If t, we subscribe (or not) all groups as if they were new. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1278 (mapatoms |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1279 (lambda (sym) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1280 (when (setq group (symbol-name sym)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1281 (let ((do-sub (gnus-matches-options-n group))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1282 (cond |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1283 ((eq do-sub 'subscribe) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1284 (gnus-sethash group group gnus-killed-hashtb) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1285 (gnus-call-subscribe-functions |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1286 gnus-subscribe-options-newsgroup-method group)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1287 ((eq do-sub 'ignore) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1288 nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1289 (t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1290 (push group gnus-killed-list)))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1291 gnus-active-hashtb) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1292 (dolist (group groups) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1293 ;; Only subscribe the default groups that are activated. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1294 (when (gnus-active group) |
17493 | 1295 (gnus-group-change-level |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1296 group gnus-level-default-subscribed gnus-level-killed))) |
110410
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
1297 (with-current-buffer gnus-group-buffer |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1298 ;; Don't error if the group already exists. This happens when a |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1299 ;; first-time user types 'F'. -- didier |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1300 (gnus-group-make-help-group t)) |
17493 | 1301 (when gnus-novice-user |
1302 (gnus-message 7 "`A k' to list killed groups")))))) | |
1303 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1304 (defun gnus-subscribe-group (group &optional previous method) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1305 "Subscribe GROUP and put it after PREVIOUS." |
17493 | 1306 (gnus-group-change-level |
1307 (if method | |
1308 (list t group gnus-level-default-subscribed nil nil method) | |
1309 group) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1310 gnus-level-default-subscribed gnus-level-killed previous t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1311 t) |
17493 | 1312 |
1313 ;; `gnus-group-change-level' is the fundamental function for changing | |
1314 ;; subscription levels of newsgroups. This might mean just changing | |
1315 ;; from level 1 to 2, which is pretty trivial, from 2 to 6 or back | |
1316 ;; again, which subscribes/unsubscribes a group, which is equally | |
1317 ;; trivial. Changing from 1-7 to 8-9 means that you kill a group, and | |
1318 ;; from 8-9 to 1-7 means that you remove the group from the list of | |
1319 ;; killed (or zombie) groups and add them to the (kinda) subscribed | |
1320 ;; groups. And last but not least, moving from 8 to 9 and 9 to 8, | |
1321 ;; which is trivial. | |
1322 ;; ENTRY can either be a string (newsgroup name) or a list (if | |
1323 ;; FROMKILLED is t, it's a list on the format (NUM INFO-LIST), | |
1324 ;; otherwise it's a list in the format of the `gnus-newsrc-hashtb' | |
1325 ;; entries. | |
1326 ;; LEVEL is the new level of the group, OLDLEVEL is the old level and | |
1327 ;; PREVIOUS is the group (in hashtb entry format) to insert this group | |
1328 ;; after. | |
1329 (defun gnus-group-change-level (entry level &optional oldlevel | |
1330 previous fromkilled) | |
1331 (let (group info active num) | |
1332 ;; Glean what info we can from the arguments | |
1333 (if (consp entry) | |
1334 (if fromkilled (setq group (nth 1 entry)) | |
1335 (setq group (car (nth 2 entry)))) | |
1336 (setq group entry)) | |
1337 (when (and (stringp entry) | |
1338 oldlevel | |
1339 (< oldlevel gnus-level-zombie)) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1340 (setq entry (gnus-group-entry entry))) |
17493 | 1341 (if (and (not oldlevel) |
1342 (consp entry)) | |
1343 (setq oldlevel (gnus-info-level (nth 2 entry))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
1344 (setq oldlevel (or oldlevel gnus-level-killed))) |
17493 | 1345 (when (stringp previous) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1346 (setq previous (gnus-group-entry previous))) |
17493 | 1347 |
1348 (if (and (>= oldlevel gnus-level-zombie) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1349 (gnus-group-entry group)) |
17493 | 1350 ;; We are trying to subscribe a group that is already |
1351 ;; subscribed. | |
1352 () ; Do nothing. | |
1353 | |
1354 (unless (gnus-ephemeral-group-p group) | |
1355 (gnus-dribble-enter | |
1356 (format "(gnus-group-change-level %S %S %S %S %S)" | |
1357 group level oldlevel (car (nth 2 previous)) fromkilled))) | |
1358 | |
1359 ;; Then we remove the newgroup from any old structures, if needed. | |
1360 ;; If the group was killed, we remove it from the killed or zombie | |
1361 ;; list. If not, and it is in fact going to be killed, we remove | |
1362 ;; it from the newsrc hash table and assoc. | |
1363 (cond | |
1364 ((>= oldlevel gnus-level-zombie) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1365 ;; oldlevel could be wrong. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1366 (setq gnus-zombie-list (delete group gnus-zombie-list)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1367 (setq gnus-killed-list (delete group gnus-killed-list))) |
17493 | 1368 (t |
1369 (when (and (>= level gnus-level-zombie) | |
1370 entry) | |
1371 (gnus-sethash (car (nth 2 entry)) nil gnus-newsrc-hashtb) | |
1372 (when (nth 3 entry) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1373 (setcdr (gnus-group-entry (car (nth 3 entry))) |
17493 | 1374 (cdr entry))) |
1375 (setcdr (cdr entry) (cdddr entry))))) | |
1376 | |
1377 ;; Finally we enter (if needed) the list where it is supposed to | |
1378 ;; go, and change the subscription level. If it is to be killed, | |
1379 ;; we enter it into the killed or zombie list. | |
1380 (cond | |
1381 ((>= level gnus-level-zombie) | |
1382 ;; Remove from the hash table. | |
1383 (gnus-sethash group nil gnus-newsrc-hashtb) | |
1384 ;; We do not enter foreign groups into the list of dead | |
1385 ;; groups. | |
1386 (unless (gnus-group-foreign-p group) | |
1387 (if (= level gnus-level-zombie) | |
1388 (push group gnus-zombie-list) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1389 (if (= oldlevel gnus-level-killed) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1390 ;; Remove from active hashtb. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1391 (unintern group gnus-active-hashtb) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1392 ;; Don't add it into killed-list if it was killed. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1393 (push group gnus-killed-list))))) |
17493 | 1394 (t |
1395 ;; If the list is to be entered into the newsrc assoc, and | |
1396 ;; it was killed, we have to create an entry in the newsrc | |
1397 ;; hashtb format and fix the pointers in the newsrc assoc. | |
1398 (if (< oldlevel gnus-level-zombie) | |
1399 ;; It was alive, and it is going to stay alive, so we | |
1400 ;; just change the level and don't change any pointers or | |
1401 ;; hash table entries. | |
1402 (setcar (cdaddr entry) level) | |
1403 (if (listp entry) | |
1404 (setq info (cdr entry) | |
1405 num (car entry)) | |
1406 (setq active (gnus-active group)) | |
1407 (setq num | |
1408 (if active (- (1+ (cdr active)) (car active)) t)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1409 ;; Shorten the select method if possible, if we need to |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1410 ;; store it at all (native groups). |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1411 (let ((method (gnus-method-simplify |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1412 (or gnus-override-subscribe-method |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1413 (gnus-group-method group))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1414 (if method |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1415 (setq info (list group level nil nil method)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1416 (setq info (list group level nil))))) |
17493 | 1417 (unless previous |
1418 (setq previous | |
1419 (let ((p gnus-newsrc-alist)) | |
1420 (while (cddr p) | |
1421 (setq p (cdr p))) | |
1422 p))) | |
1423 (setq entry (cons info (cddr previous))) | |
1424 (if (cdr previous) | |
1425 (progn | |
1426 (setcdr (cdr previous) entry) | |
1427 (gnus-sethash group (cons num (cdr previous)) | |
1428 gnus-newsrc-hashtb)) | |
1429 (setcdr previous entry) | |
1430 (gnus-sethash group (cons num previous) | |
1431 gnus-newsrc-hashtb)) | |
1432 (when (cdr entry) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1433 (setcdr (gnus-group-entry (caadr entry)) entry)) |
17493 | 1434 (gnus-dribble-enter |
1435 (format | |
1436 "(gnus-group-set-info '%S)" info))))) | |
1437 (when gnus-group-change-level-function | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19910
diff
changeset
|
1438 (funcall gnus-group-change-level-function |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19910
diff
changeset
|
1439 group level oldlevel previous))))) |
17493 | 1440 |
1441 (defun gnus-kill-newsgroup (newsgroup) | |
1442 "Obsolete function. Kills a newsgroup." | |
1443 (gnus-group-change-level | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1444 (gnus-group-entry newsgroup) gnus-level-killed)) |
17493 | 1445 |
1446 (defun gnus-check-bogus-newsgroups (&optional confirm) | |
1447 "Remove bogus newsgroups. | |
1448 If CONFIRM is non-nil, the user has to confirm the deletion of every | |
1449 newsgroup." | |
1450 (let ((newsrc (cdr gnus-newsrc-alist)) | |
1451 bogus group entry info) | |
1452 (gnus-message 5 "Checking bogus newsgroups...") | |
1453 (unless (gnus-read-active-file-p) | |
1454 (gnus-read-active-file t)) | |
1455 (when (gnus-read-active-file-p) | |
1456 ;; Find all bogus newsgroup that are subscribed. | |
1457 (while newsrc | |
1458 (setq info (pop newsrc) | |
1459 group (gnus-info-group info)) | |
1460 (unless (or (gnus-active group) ; Active | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1461 (and (gnus-info-method info) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1462 (not (gnus-secondary-method-p |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1463 (gnus-info-method info))))) ; Foreign |
17493 | 1464 ;; Found a bogus newsgroup. |
1465 (push group bogus))) | |
1466 (if confirm | |
1467 (map-y-or-n-p | |
110689
42815c76b976
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110583
diff
changeset
|
1468 (format "Remove bogus group %%s (of %d groups)? " (length bogus)) |
17493 | 1469 (lambda (group) |
1470 ;; Remove all bogus subscribed groups by first killing them, and | |
1471 ;; then removing them from the list of killed groups. | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1472 (when (setq entry (gnus-group-entry group)) |
17493 | 1473 (gnus-group-change-level entry gnus-level-killed) |
1474 (setq gnus-killed-list (delete group gnus-killed-list)))) | |
1475 bogus '("group" "groups" "remove")) | |
1476 (while (setq group (pop bogus)) | |
1477 ;; Remove all bogus subscribed groups by first killing them, and | |
1478 ;; then removing them from the list of killed groups. | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1479 (when (setq entry (gnus-group-entry group)) |
17493 | 1480 (gnus-group-change-level entry gnus-level-killed) |
1481 (setq gnus-killed-list (delete group gnus-killed-list))))) | |
1482 ;; Then we remove all bogus groups from the list of killed and | |
1483 ;; zombie groups. They are removed without confirmation. | |
1484 (let ((dead-lists '(gnus-killed-list gnus-zombie-list)) | |
1485 killed) | |
1486 (while dead-lists | |
1487 (setq killed (symbol-value (car dead-lists))) | |
1488 (while killed | |
1489 (unless (gnus-active (setq group (pop killed))) | |
1490 ;; The group is bogus. | |
1491 ;; !!!Slow as hell. | |
1492 (set (car dead-lists) | |
1493 (delete group (symbol-value (car dead-lists)))))) | |
1494 (setq dead-lists (cdr dead-lists)))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
1495 (gnus-run-hooks 'gnus-check-bogus-groups-hook) |
17493 | 1496 (gnus-message 5 "Checking bogus newsgroups...done")))) |
1497 | |
1498 (defun gnus-check-duplicate-killed-groups () | |
1499 "Remove duplicates from the list of killed groups." | |
1500 (interactive) | |
1501 (let ((killed gnus-killed-list)) | |
1502 (while killed | |
1503 (gnus-message 9 "%d" (length killed)) | |
1504 (setcdr killed (delete (car killed) (cdr killed))) | |
1505 (setq killed (cdr killed))))) | |
1506 | |
1507 ;; We want to inline a function from gnus-cache, so we cheat here: | |
86154 | 1508 (defvar gnus-cache-active-hashtb) |
17493 | 1509 (eval-when-compile |
1510 (defun gnus-cache-possibly-alter-active (group active) | |
1511 "Alter the ACTIVE info for GROUP to reflect the articles in the cache." | |
1512 (when gnus-cache-active-hashtb | |
1513 (let ((cache-active (gnus-gethash group gnus-cache-active-hashtb))) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19910
diff
changeset
|
1514 (when cache-active |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19910
diff
changeset
|
1515 (when (< (car cache-active) (car active)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19910
diff
changeset
|
1516 (setcar active (car cache-active))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19910
diff
changeset
|
1517 (when (> (cdr cache-active) (cdr active)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19910
diff
changeset
|
1518 (setcdr active (cdr cache-active)))))))) |
17493 | 1519 |
110217
5c9d7f960c31
gnus-start.el (gnus-activate-group): Take an optional parameter to say that you don't want to call gnus-request-group with don-check, but do check the reponse. This is for virtual groups only.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110208
diff
changeset
|
1520 (defun gnus-activate-group (group &optional scan dont-check method |
5c9d7f960c31
gnus-start.el (gnus-activate-group): Take an optional parameter to say that you don't want to call gnus-request-group with don-check, but do check the reponse. This is for virtual groups only.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110208
diff
changeset
|
1521 dont-sub-check) |
57581
645f020dcc8a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-626
Miles Bader <miles@gnu.org>
parents:
57153
diff
changeset
|
1522 "Check whether a group has been activated or not. |
645f020dcc8a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-626
Miles Bader <miles@gnu.org>
parents:
57153
diff
changeset
|
1523 If SCAN, request a scan of that group as well." |
17493 | 1524 (let ((method (or method (inline (gnus-find-method-for-group group)))) |
1525 active) | |
1526 (and (inline (gnus-check-server method)) | |
1527 ;; We escape all bugs and quit here to make it possible to | |
1528 ;; continue if a group is so out-there that it reports bugs | |
1529 ;; and stuff. | |
1530 (progn | |
1531 (and scan | |
1532 (gnus-check-backend-function 'request-scan (car method)) | |
1533 (gnus-request-scan group method)) | |
1534 t) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1535 (if (or debug-on-error debug-on-quit) |
110217
5c9d7f960c31
gnus-start.el (gnus-activate-group): Take an optional parameter to say that you don't want to call gnus-request-group with don-check, but do check the reponse. This is for virtual groups only.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110208
diff
changeset
|
1536 (inline (gnus-request-group group (or dont-sub-check dont-check) |
110422
93e093c035a0
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110413
diff
changeset
|
1537 method |
93e093c035a0
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110413
diff
changeset
|
1538 (gnus-get-info group))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1539 (condition-case nil |
110217
5c9d7f960c31
gnus-start.el (gnus-activate-group): Take an optional parameter to say that you don't want to call gnus-request-group with don-check, but do check the reponse. This is for virtual groups only.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110208
diff
changeset
|
1540 (inline (gnus-request-group group (or dont-sub-check dont-check) |
110422
93e093c035a0
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110413
diff
changeset
|
1541 method |
93e093c035a0
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110413
diff
changeset
|
1542 (gnus-get-info group))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1543 ;;(error nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1544 (quit |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1545 (message "Quit activating %s" group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1546 nil))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1547 (unless dont-check |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1548 (setq active (gnus-parse-active)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1549 ;; If there are no articles in the group, the GROUP |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1550 ;; command may have responded with the `(0 . 0)'. We |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1551 ;; ignore this if we already have an active entry |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1552 ;; for the group. |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1553 (if (and (zerop (or (car active) 0)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1554 (zerop (or (cdr active) 0)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1555 (gnus-active group)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1556 (gnus-active group) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1557 |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
1558 ;; If a cache is present, we may have to alter the active info. |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
1559 (when gnus-use-cache |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
1560 (inline (gnus-cache-possibly-alter-active |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
1561 group active))) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
1562 |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
1563 ;; If the agent is enabled, we may have to alter the active info. |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
1564 (when gnus-agent |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
1565 (gnus-agent-possibly-alter-active group active)) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
1566 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1567 (gnus-set-active group active) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1568 ;; Return the new active info. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1569 active))))) |
17493 | 1570 |
1571 (defun gnus-get-unread-articles-in-group (info active &optional update) | |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
1572 (when (and info active) |
17493 | 1573 ;; Allow the backend to update the info in the group. |
1574 (when (and update | |
1575 (gnus-request-update-info | |
1576 info (inline (gnus-find-method-for-group | |
1577 (gnus-info-group info))))) | |
1578 (gnus-activate-group (gnus-info-group info) nil t)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
1579 |
110516
4d2f8b81bb01
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110486
diff
changeset
|
1580 ;; Allow backends to update marks, |
4d2f8b81bb01
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110486
diff
changeset
|
1581 (when gnus-use-backend-marks |
4d2f8b81bb01
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110486
diff
changeset
|
1582 (let ((method (inline (gnus-find-method-for-group |
4d2f8b81bb01
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110486
diff
changeset
|
1583 (gnus-info-group info))))) |
4d2f8b81bb01
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110486
diff
changeset
|
1584 (when (gnus-check-backend-function 'request-marks (car method)) |
4d2f8b81bb01
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110486
diff
changeset
|
1585 (gnus-request-marks info method)))) |
4d2f8b81bb01
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110486
diff
changeset
|
1586 |
17493 | 1587 (let* ((range (gnus-info-read info)) |
1588 (num 0)) | |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
1589 |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
1590 ;; These checks are present in gnus-activate-group but skipped |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
1591 ;; due to setting dont-check in the preceeding call. |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
1592 |
17493 | 1593 ;; If a cache is present, we may have to alter the active info. |
1594 (when (and gnus-use-cache info) | |
1595 (inline (gnus-cache-possibly-alter-active | |
1596 (gnus-info-group info) active))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1597 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1598 ;; If the agent is enabled, we may have to alter the active info. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1599 (when (and gnus-agent info) |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
1600 (gnus-agent-possibly-alter-active (gnus-info-group info) active info)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1601 |
17493 | 1602 ;; Modify the list of read articles according to what articles |
1603 ;; are available; then tally the unread articles and add the | |
1604 ;; number to the group hash table entry. | |
1605 (cond | |
1606 ((zerop (cdr active)) | |
1607 (setq num 0)) | |
1608 ((not range) | |
1609 (setq num (- (1+ (cdr active)) (car active)))) | |
1610 ((not (listp (cdr range))) | |
1611 ;; Fix a single (num . num) range according to the | |
1612 ;; active hash table. | |
1613 ;; Fix by Carsten Bormann <cabo@Informatik.Uni-Bremen.DE>. | |
1614 (and (< (cdr range) (car active)) (setcdr range (1- (car active)))) | |
1615 (and (> (cdr range) (cdr active)) (setcdr range (cdr active))) | |
1616 ;; Compute number of unread articles. | |
1617 (setq num (max 0 (- (cdr active) (- (1+ (cdr range)) (car range)))))) | |
1618 (t | |
1619 ;; The read list is a list of ranges. Fix them according to | |
1620 ;; the active hash table. | |
1621 ;; First peel off any elements that are below the lower | |
1622 ;; active limit. | |
1623 (while (and (cdr range) | |
1624 (>= (car active) | |
1625 (or (and (atom (cadr range)) (cadr range)) | |
1626 (caadr range)))) | |
1627 (if (numberp (car range)) | |
1628 (setcar range | |
1629 (cons (car range) | |
1630 (or (and (numberp (cadr range)) | |
1631 (cadr range)) | |
1632 (cdadr range)))) | |
1633 (setcdr (car range) | |
1634 (or (and (numberp (nth 1 range)) (nth 1 range)) | |
1635 (cdadr range)))) | |
1636 (setcdr range (cddr range))) | |
1637 ;; Adjust the first element to be the same as the lower limit. | |
1638 (when (and (not (atom (car range))) | |
1639 (< (cdar range) (car active))) | |
1640 (setcdr (car range) (1- (car active)))) | |
1641 ;; Then we want to peel off any elements that are higher | |
1642 ;; than the upper active limit. | |
1643 (let ((srange range)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1644 ;; Go past all valid elements. |
17493 | 1645 (while (and (cdr srange) |
1646 (<= (or (and (atom (cadr srange)) | |
1647 (cadr srange)) | |
1648 (caadr srange)) | |
1649 (cdr active))) | |
1650 (setq srange (cdr srange))) | |
1651 (when (cdr srange) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1652 ;; Nuke all remaining invalid elements. |
17493 | 1653 (setcdr srange nil)) |
1654 | |
1655 ;; Adjust the final element. | |
1656 (when (and (not (atom (car srange))) | |
1657 (> (cdar srange) (cdr active))) | |
1658 (setcdr (car srange) (cdr active)))) | |
1659 ;; Compute the number of unread articles. | |
1660 (while range | |
1661 (setq num (+ num (- (1+ (or (and (atom (car range)) (car range)) | |
1662 (cdar range))) | |
1663 (or (and (atom (car range)) (car range)) | |
1664 (caar range))))) | |
1665 (setq range (cdr range))) | |
1666 (setq num (max 0 (- (cdr active) num))))) | |
1667 ;; Set the number of unread articles. | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1668 (when (and info |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1669 (gnus-group-entry (gnus-info-group info))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1670 (setcar (gnus-group-entry (gnus-info-group info)) num)) |
17493 | 1671 num))) |
1672 | |
1673 ;; Go though `gnus-newsrc-alist' and compare with `gnus-active-hashtb' | |
1674 ;; and compute how many unread articles there are in each group. | |
1675 (defun gnus-get-unread-articles (&optional level) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1676 (setq gnus-server-method-cache nil) |
17493 | 1677 (let* ((newsrc (cdr gnus-newsrc-alist)) |
87097 | 1678 (alevel (or level gnus-activate-level (1+ gnus-level-subscribed))) |
17493 | 1679 (foreign-level |
110256
db1e98f7484b
gnus-start.el (gnus-get-unread-articles): If being given an explicit level to get unread articles from, then use that for foreign groups, too.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110254
diff
changeset
|
1680 (or |
db1e98f7484b
gnus-start.el (gnus-get-unread-articles): If being given an explicit level to get unread articles from, then use that for foreign groups, too.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110254
diff
changeset
|
1681 level |
db1e98f7484b
gnus-start.el (gnus-get-unread-articles): If being given an explicit level to get unread articles from, then use that for foreign groups, too.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110254
diff
changeset
|
1682 (min |
db1e98f7484b
gnus-start.el (gnus-get-unread-articles): If being given an explicit level to get unread articles from, then use that for foreign groups, too.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110254
diff
changeset
|
1683 (cond ((and gnus-activate-foreign-newsgroups |
db1e98f7484b
gnus-start.el (gnus-get-unread-articles): If being given an explicit level to get unread articles from, then use that for foreign groups, too.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110254
diff
changeset
|
1684 (not (numberp gnus-activate-foreign-newsgroups))) |
db1e98f7484b
gnus-start.el (gnus-get-unread-articles): If being given an explicit level to get unread articles from, then use that for foreign groups, too.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110254
diff
changeset
|
1685 (1+ gnus-level-subscribed)) |
db1e98f7484b
gnus-start.el (gnus-get-unread-articles): If being given an explicit level to get unread articles from, then use that for foreign groups, too.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110254
diff
changeset
|
1686 ((numberp gnus-activate-foreign-newsgroups) |
db1e98f7484b
gnus-start.el (gnus-get-unread-articles): If being given an explicit level to get unread articles from, then use that for foreign groups, too.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110254
diff
changeset
|
1687 gnus-activate-foreign-newsgroups) |
db1e98f7484b
gnus-start.el (gnus-get-unread-articles): If being given an explicit level to get unread articles from, then use that for foreign groups, too.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110254
diff
changeset
|
1688 (t 0)) |
db1e98f7484b
gnus-start.el (gnus-get-unread-articles): If being given an explicit level to get unread articles from, then use that for foreign groups, too.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110254
diff
changeset
|
1689 alevel))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1690 (methods-cache nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1691 (type-cache nil) |
110191
1e69e141b6a0
gnus-agent.el (gnus-agent-load-local): Only read the agent.lib/local file once per `g' run.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110189
diff
changeset
|
1692 (gnus-agent-article-local-times 0) |
110218
f9aca84de985
gnus-start.el (gnus-get-unread-articles): Count the archive groups as secondary, so that they're activated the same way as before.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110217
diff
changeset
|
1693 (archive-method (gnus-server-to-method "archive")) |
110189
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1694 infos info group active method cmethod |
110289
ed38b7a7f11e
gnus-start.el (gnus-get-unread-articles): Set the number of unread articles of every unchecked group to t, which means unknown since the server has never been opened.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110256
diff
changeset
|
1695 method-type method-group-list entry) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1696 (gnus-message 6 "Checking new news...") |
17493 | 1697 |
1698 (while newsrc | |
1699 (setq active (gnus-active (setq group (gnus-info-group | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1700 (setq info (pop newsrc)))))) |
110189
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1701 ;; First go through all the groups, see what select methods they |
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1702 ;; belong to, and then collect them into lists per unique select |
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1703 ;; method. |
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1704 (if (not (setq method (gnus-info-method info))) |
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1705 (setq method gnus-select-method) |
110465
b7b7e970d807
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110433
diff
changeset
|
1706 ;; There may be several similar methods. Possibly extend the |
b7b7e970d807
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110433
diff
changeset
|
1707 ;; method. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1708 (if (setq cmethod (assoc method methods-cache)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1709 (setq method (cdr cmethod)) |
110465
b7b7e970d807
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110433
diff
changeset
|
1710 (setq cmethod (if (stringp method) |
b7b7e970d807
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110433
diff
changeset
|
1711 (gnus-server-to-method method) |
b7b7e970d807
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110433
diff
changeset
|
1712 (inline (gnus-find-method-for-group |
b7b7e970d807
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110433
diff
changeset
|
1713 (gnus-info-group info) info)))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1714 (push (cons method cmethod) methods-cache) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1715 (setq method cmethod))) |
110189
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1716 (setq method-group-list (assoc method type-cache)) |
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1717 (unless method-group-list |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1718 (setq method-type |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1719 (cond |
110218
f9aca84de985
gnus-start.el (gnus-get-unread-articles): Count the archive groups as secondary, so that they're activated the same way as before.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110217
diff
changeset
|
1720 ((or (gnus-secondary-method-p method) |
f9aca84de985
gnus-start.el (gnus-get-unread-articles): Count the archive groups as secondary, so that they're activated the same way as before.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110217
diff
changeset
|
1721 (and (gnus-archive-server-wanted-p) |
f9aca84de985
gnus-start.el (gnus-get-unread-articles): Count the archive groups as secondary, so that they're activated the same way as before.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110217
diff
changeset
|
1722 (gnus-methods-equal-p archive-method method))) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1723 'secondary) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1724 ((inline (gnus-server-equal gnus-select-method method)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1725 'primary) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1726 (t |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1727 'foreign))) |
110410
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
1728 (push (setq method-group-list (list method method-type nil nil)) |
110189
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1729 type-cache)) |
110222
9def4c1af9b9
gnus-start.el (gnus-get-unread-articles): Don't bother with groups that aren't going to be activated.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110218
diff
changeset
|
1730 ;; Only add groups that need updating. |
110289
ed38b7a7f11e
gnus-start.el (gnus-get-unread-articles): Set the number of unread articles of every unchecked group to t, which means unknown since the server has never been opened.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110256
diff
changeset
|
1731 (if (<= (gnus-info-level info) |
ed38b7a7f11e
gnus-start.el (gnus-get-unread-articles): Set the number of unread articles of every unchecked group to t, which means unknown since the server has never been opened.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110256
diff
changeset
|
1732 (if (eq (cadr method-group-list) 'foreign) |
ed38b7a7f11e
gnus-start.el (gnus-get-unread-articles): Set the number of unread articles of every unchecked group to t, which means unknown since the server has never been opened.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110256
diff
changeset
|
1733 foreign-level |
ed38b7a7f11e
gnus-start.el (gnus-get-unread-articles): Set the number of unread articles of every unchecked group to t, which means unknown since the server has never been opened.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110256
diff
changeset
|
1734 alevel)) |
ed38b7a7f11e
gnus-start.el (gnus-get-unread-articles): Set the number of unread articles of every unchecked group to t, which means unknown since the server has never been opened.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110256
diff
changeset
|
1735 (setcar (nthcdr 2 method-group-list) |
ed38b7a7f11e
gnus-start.el (gnus-get-unread-articles): Set the number of unread articles of every unchecked group to t, which means unknown since the server has never been opened.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110256
diff
changeset
|
1736 (cons info (nth 2 method-group-list))) |
ed38b7a7f11e
gnus-start.el (gnus-get-unread-articles): Set the number of unread articles of every unchecked group to t, which means unknown since the server has never been opened.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110256
diff
changeset
|
1737 ;; The group is inactive, so we nix out the number of unread articles. |
ed38b7a7f11e
gnus-start.el (gnus-get-unread-articles): Set the number of unread articles of every unchecked group to t, which means unknown since the server has never been opened.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110256
diff
changeset
|
1738 ;; It leads `(gnus-group-unread group)' to return t. See also |
ed38b7a7f11e
gnus-start.el (gnus-get-unread-articles): Set the number of unread articles of every unchecked group to t, which means unknown since the server has never been opened.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110256
diff
changeset
|
1739 ;; `gnus-group-prepare-flat'. |
ed38b7a7f11e
gnus-start.el (gnus-get-unread-articles): Set the number of unread articles of every unchecked group to t, which means unknown since the server has never been opened.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110256
diff
changeset
|
1740 (unless active |
ed38b7a7f11e
gnus-start.el (gnus-get-unread-articles): Set the number of unread articles of every unchecked group to t, which means unknown since the server has never been opened.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110256
diff
changeset
|
1741 (when (setq entry (gnus-group-entry group)) |
ed38b7a7f11e
gnus-start.el (gnus-get-unread-articles): Set the number of unread articles of every unchecked group to t, which means unknown since the server has never been opened.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110256
diff
changeset
|
1742 (setcar entry t))))) |
110189
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1743 |
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1744 ;; Sort the methods based so that the primary and secondary |
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1745 ;; methods come first. This is done for legacy reasons to try to |
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1746 ;; ensure that side-effect behaviour doesn't change from previous |
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1747 ;; Gnus versions. |
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1748 (setq type-cache |
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1749 (sort (nreverse type-cache) |
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1750 (lambda (c1 c2) |
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1751 (< (gnus-method-rank (cadr c1) (car c1)) |
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1752 (gnus-method-rank (cadr c2) (car c2)))))) |
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1753 |
110410
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
1754 ;; Start early async retrieval of data. |
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
1755 (dolist (elem type-cache) |
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
1756 (destructuring-bind (method method-type infos dummy) elem |
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
1757 (when (and method infos |
110433
33cf78a271ef
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110428
diff
changeset
|
1758 (not (gnus-method-denied-p method))) |
33cf78a271ef
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110428
diff
changeset
|
1759 (unless (gnus-server-opened method) |
33cf78a271ef
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110428
diff
changeset
|
1760 (gnus-open-server method)) |
110583
b6d2a63ad993
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110541
diff
changeset
|
1761 (when (and |
b6d2a63ad993
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110541
diff
changeset
|
1762 (gnus-server-opened method) |
b6d2a63ad993
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110541
diff
changeset
|
1763 (gnus-check-backend-function |
b6d2a63ad993
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110541
diff
changeset
|
1764 'retrieve-group-data-early (car method))) |
110433
33cf78a271ef
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110428
diff
changeset
|
1765 (when (gnus-check-backend-function 'request-scan (car method)) |
110486
1ad1adb298a3
Merge Changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110465
diff
changeset
|
1766 (gnus-request-scan nil method)) |
110433
33cf78a271ef
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110428
diff
changeset
|
1767 (setcar (nthcdr 3 elem) |
33cf78a271ef
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110428
diff
changeset
|
1768 (gnus-retrieve-group-data-early method infos)))))) |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
1769 |
110410
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
1770 ;; Do the rest of the retrieval. |
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
1771 (dolist (elem type-cache) |
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
1772 (destructuring-bind (method method-type infos early-data) elem |
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
1773 (when (and method infos) |
110516
4d2f8b81bb01
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110486
diff
changeset
|
1774 (let ((updatep (gnus-check-backend-function |
4d2f8b81bb01
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110486
diff
changeset
|
1775 'request-update-info (car method)))) |
4d2f8b81bb01
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110486
diff
changeset
|
1776 ;; See if any of the groups from this method require updating. |
4d2f8b81bb01
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110486
diff
changeset
|
1777 (gnus-read-active-for-groups method infos early-data) |
4d2f8b81bb01
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110486
diff
changeset
|
1778 (dolist (info infos) |
4d2f8b81bb01
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110486
diff
changeset
|
1779 (inline (gnus-get-unread-articles-in-group |
4d2f8b81bb01
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110486
diff
changeset
|
1780 info (gnus-active (gnus-info-group info)) |
4d2f8b81bb01
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110486
diff
changeset
|
1781 updatep))))))) |
110189
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1782 (gnus-message 6 "Checking new news...done"))) |
17493 | 1783 |
110189
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1784 (defun gnus-method-rank (type method) |
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1785 (cond |
110207
73e771a95111
gnus-start.el (gnus-method-rank): Get info for virtual groups last.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110203
diff
changeset
|
1786 ;; Get info for virtual groups last. |
73e771a95111
gnus-start.el (gnus-method-rank): Get info for virtual groups last.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110203
diff
changeset
|
1787 ((eq (car method) 'nnvirtual) |
73e771a95111
gnus-start.el (gnus-method-rank): Get info for virtual groups last.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110203
diff
changeset
|
1788 200) |
110189
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1789 ((eq type 'primary) |
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1790 1) |
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1791 ;; Compute the rank of the secondary methods based on where they |
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1792 ;; are in the secondary select list. |
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1793 ((eq type 'secondary) |
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1794 (let ((i 2)) |
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1795 (block nil |
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1796 (dolist (smethod gnus-secondary-select-methods) |
110203
1ef614366598
gnus-start.el (gnus-method-rank): Replace equalp with equal.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110195
diff
changeset
|
1797 (when (equal method smethod) |
110189
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1798 (return i)) |
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1799 (incf i)) |
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1800 i))) |
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1801 ;; Just say that all foreign groups have the same rank. |
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1802 (t |
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1803 100))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
1804 |
110410
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
1805 (defun gnus-read-active-for-groups (method infos early-data) |
110189
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1806 (with-current-buffer nntp-server-buffer |
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1807 (cond |
110410
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
1808 ((and |
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
1809 (gnus-check-backend-function 'finish-retrieve-group-infos (car method)) |
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
1810 (or (not (gnus-agent-method-p method)) |
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
1811 (gnus-online method))) |
110428
6060b86fc551
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110422
diff
changeset
|
1812 (gnus-finish-retrieve-group-infos method infos early-data) |
6060b86fc551
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110422
diff
changeset
|
1813 (gnus-agent-save-active method)) |
110189
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1814 ((gnus-check-backend-function 'retrieve-groups (car method)) |
110254
8b5fccbe534c
gnus-start.el (gnus-read-active-for-groups): Do a `gnus-request-scan' for the methods that support -retrieve-groups, too.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110223
diff
changeset
|
1815 (when (gnus-check-backend-function 'request-scan (car method)) |
110486
1ad1adb298a3
Merge Changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110465
diff
changeset
|
1816 (gnus-request-scan nil method)) |
110299
593e2b90e58b
gnus-start.el (gnus-read-active-for-groups): Check only subscribed groups.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110289
diff
changeset
|
1817 (let (groups) |
593e2b90e58b
gnus-start.el (gnus-read-active-for-groups): Check only subscribed groups.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110289
diff
changeset
|
1818 (gnus-read-active-file-2 |
593e2b90e58b
gnus-start.el (gnus-read-active-for-groups): Check only subscribed groups.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110289
diff
changeset
|
1819 (dolist (info infos (nreverse groups)) |
593e2b90e58b
gnus-start.el (gnus-read-active-for-groups): Check only subscribed groups.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110289
diff
changeset
|
1820 (push (gnus-group-real-name (gnus-info-group info)) groups)) |
593e2b90e58b
gnus-start.el (gnus-read-active-for-groups): Check only subscribed groups.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110289
diff
changeset
|
1821 method))) |
110333
c2883613e1b5
Fixed up nnrss group activation, and removed moreover stuff.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110329
diff
changeset
|
1822 ((gnus-check-backend-function 'request-list (car method)) |
110299
593e2b90e58b
gnus-start.el (gnus-read-active-for-groups): Check only subscribed groups.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110289
diff
changeset
|
1823 (gnus-read-active-file-1 method nil infos)) |
110189
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1824 (t |
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
1825 (dolist (info infos) |
110333
c2883613e1b5
Fixed up nnrss group activation, and removed moreover stuff.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110329
diff
changeset
|
1826 (gnus-activate-group (gnus-info-group info) nil nil method t)))))) |
17493 | 1827 |
1828 ;; Create a hash table out of the newsrc alist. The `car's of the | |
1829 ;; alist elements are used as keys. | |
1830 (defun gnus-make-hashtable-from-newsrc-alist () | |
1831 (let ((alist gnus-newsrc-alist) | |
1832 (ohashtb gnus-newsrc-hashtb) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1833 prev info method rest methods) |
17493 | 1834 (setq gnus-newsrc-hashtb (gnus-make-hashtable (length alist))) |
1835 (setq alist | |
1836 (setq prev (setq gnus-newsrc-alist | |
1837 (if (equal (caar gnus-newsrc-alist) | |
1838 "dummy.group") | |
1839 gnus-newsrc-alist | |
1840 (cons (list "dummy.group" 0 nil) alist))))) | |
1841 (while alist | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1842 (setq info (car alist)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1843 ;; Make the same select-methods identical Lisp objects. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1844 (when (setq method (gnus-info-method info)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1845 (if (setq rest (member method methods)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1846 (gnus-info-set-method info (car rest)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1847 (push method methods))) |
110194
1acd79f80f50
gnus-start.el (gnus-make-hashtable-from-newsrc-alist): Remove duplicates from .newsrc list.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110193
diff
changeset
|
1848 ;; Check for duplicates. |
1acd79f80f50
gnus-start.el (gnus-make-hashtable-from-newsrc-alist): Remove duplicates from .newsrc list.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110193
diff
changeset
|
1849 (if (gnus-gethash (car info) gnus-newsrc-hashtb) |
1acd79f80f50
gnus-start.el (gnus-make-hashtable-from-newsrc-alist): Remove duplicates from .newsrc list.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110193
diff
changeset
|
1850 ;; Remove this entry from the alist. |
1acd79f80f50
gnus-start.el (gnus-make-hashtable-from-newsrc-alist): Remove duplicates from .newsrc list.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110193
diff
changeset
|
1851 (setcdr prev (cddr prev)) |
1acd79f80f50
gnus-start.el (gnus-make-hashtable-from-newsrc-alist): Remove duplicates from .newsrc list.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110193
diff
changeset
|
1852 (gnus-sethash |
1acd79f80f50
gnus-start.el (gnus-make-hashtable-from-newsrc-alist): Remove duplicates from .newsrc list.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110193
diff
changeset
|
1853 (car info) |
1acd79f80f50
gnus-start.el (gnus-make-hashtable-from-newsrc-alist): Remove duplicates from .newsrc list.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110193
diff
changeset
|
1854 ;; Preserve number of unread articles in groups. |
1acd79f80f50
gnus-start.el (gnus-make-hashtable-from-newsrc-alist): Remove duplicates from .newsrc list.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110193
diff
changeset
|
1855 (cons (and ohashtb (car (gnus-gethash (car info) ohashtb))) |
1acd79f80f50
gnus-start.el (gnus-make-hashtable-from-newsrc-alist): Remove duplicates from .newsrc list.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110193
diff
changeset
|
1856 prev) |
1acd79f80f50
gnus-start.el (gnus-make-hashtable-from-newsrc-alist): Remove duplicates from .newsrc list.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110193
diff
changeset
|
1857 gnus-newsrc-hashtb) |
1acd79f80f50
gnus-start.el (gnus-make-hashtable-from-newsrc-alist): Remove duplicates from .newsrc list.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110193
diff
changeset
|
1858 (setq prev alist)) |
1acd79f80f50
gnus-start.el (gnus-make-hashtable-from-newsrc-alist): Remove duplicates from .newsrc list.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110193
diff
changeset
|
1859 (setq alist (cdr alist))) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1860 ;; Make the same select-methods in `gnus-server-alist' identical |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1861 ;; as well. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1862 (while methods |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1863 (setq method (pop methods)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1864 (when (setq rest (rassoc method gnus-server-alist)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1865 (setcdr rest method))))) |
17493 | 1866 |
1867 (defun gnus-make-hashtable-from-killed () | |
1868 "Create a hash table from the killed and zombie lists." | |
1869 (let ((lists '(gnus-killed-list gnus-zombie-list)) | |
1870 list) | |
1871 (setq gnus-killed-hashtb | |
1872 (gnus-make-hashtable | |
1873 (+ (length gnus-killed-list) (length gnus-zombie-list)))) | |
1874 (while lists | |
1875 (setq list (symbol-value (pop lists))) | |
1876 (while list | |
1877 (gnus-sethash (car list) (pop list) gnus-killed-hashtb))))) | |
1878 | |
1879 (defun gnus-parse-active () | |
1880 "Parse active info in the nntp server buffer." | |
110410
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
1881 (with-current-buffer nntp-server-buffer |
17493 | 1882 (goto-char (point-min)) |
1883 ;; Parse the result we got from `gnus-request-group'. | |
1884 (when (looking-at "[0-9]+ [0-9]+ \\([0-9]+\\) [0-9]+") | |
1885 (goto-char (match-beginning 1)) | |
1886 (cons (read (current-buffer)) | |
1887 (read (current-buffer)))))) | |
1888 | |
1889 (defun gnus-make-articles-unread (group articles) | |
1890 "Mark ARTICLES in GROUP as unread." | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1891 (let* ((info (nth 2 (or (gnus-group-entry group) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1892 (gnus-group-entry |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1893 (gnus-group-real-name group))))) |
17493 | 1894 (ranges (gnus-info-read info)) |
1895 news article) | |
1896 (while articles | |
1897 (when (gnus-member-of-range | |
1898 (setq article (pop articles)) ranges) | |
1899 (push article news))) | |
1900 (when news | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1901 ;; Enter this list into the group info. |
17493 | 1902 (gnus-info-set-read |
1903 info (gnus-remove-from-range (gnus-info-read info) (nreverse news))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1904 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1905 ;; Set the number of unread articles in gnus-newsrc-hashtb. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1906 (gnus-get-unread-articles-in-group info (gnus-active group)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1907 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1908 ;; Insert the change into the group buffer and the dribble file. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1909 (gnus-group-update-group group t)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1910 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1911 (defun gnus-make-ascending-articles-unread (group articles) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1912 "Mark ascending ARTICLES in GROUP as unread." |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1913 (let* ((entry (or (gnus-group-entry group) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1914 (gnus-group-entry (gnus-group-real-name group)))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1915 (info (nth 2 entry)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1916 (ranges (gnus-info-read info)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1917 (r ranges) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1918 modified) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1919 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1920 (while articles |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1921 (let ((article (pop articles))) ; get the next article to remove from ranges |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1922 (while (let ((range (car ranges))) ; note the current range |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1923 (if (atom range) ; single value range |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1924 (cond ((not range) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1925 ;; the articles extend past the end of the ranges |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1926 ;; OK - I'm done |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1927 (setq articles nil)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1928 ((< range article) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1929 ;; this range preceeds the article. Leave the range unmodified. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1930 (pop ranges) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1931 ranges) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1932 ((= range article) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1933 ;; this range exactly matches the article; REMOVE THE RANGE. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1934 ;; NOTE: When the range being removed is the last range, the list is corrupted by inserting null at its end. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1935 (setcar ranges (cadr ranges)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1936 (setcdr ranges (cddr ranges)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1937 (setq modified (if (car ranges) t 'remove-null)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1938 nil)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1939 (let ((min (car range)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1940 (max (cdr range))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1941 ;; I have a min/max range to consider |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1942 (cond ((> min max) ; invalid range introduced by splitter |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1943 (setcar ranges (cadr ranges)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1944 (setcdr ranges (cddr ranges)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1945 (setq modified (if (car ranges) t 'remove-null)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1946 ranges) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1947 ((= min max) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1948 ;; replace min/max range with a single-value range |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1949 (setcar ranges min) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1950 ranges) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1951 ((< max article) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1952 ;; this range preceeds the article. Leave the range unmodified. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1953 (pop ranges) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1954 ranges) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1955 ((< article min) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1956 ;; this article preceeds the range. Return null to move to the |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1957 ;; next article |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1958 nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1959 (t |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1960 ;; this article splits the range into two parts |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1961 (setcdr ranges (cons (cons (1+ article) max) (cdr ranges))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1962 (setcdr range (1- article)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1963 (setq modified t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1964 ranges)))))))) |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
58959
diff
changeset
|
1965 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1966 (when modified |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1967 (when (eq modified 'remove-null) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1968 (setq r (delq nil r))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1969 ;; Enter this list into the group info. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1970 (gnus-info-set-read info r) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1971 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1972 ;; Set the number of unread articles in gnus-newsrc-hashtb. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1973 (gnus-get-unread-articles-in-group info (gnus-active group)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1974 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
1975 ;; Insert the change into the group buffer and the dribble file. |
17493 | 1976 (gnus-group-update-group group t)))) |
1977 | |
1978 ;; Enter all dead groups into the hashtb. | |
1979 (defun gnus-update-active-hashtb-from-killed () | |
1980 (let ((hashtb (setq gnus-active-hashtb (gnus-make-hashtable 4096))) | |
1981 (lists (list gnus-killed-list gnus-zombie-list)) | |
1982 killed) | |
1983 (while lists | |
1984 (setq killed (car lists)) | |
1985 (while killed | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
1986 (gnus-sethash (mm-string-as-unibyte (car killed)) nil hashtb) |
17493 | 1987 (setq killed (cdr killed))) |
1988 (setq lists (cdr lists))))) | |
1989 | |
1990 (defun gnus-get-killed-groups () | |
1991 "Go through the active hashtb and mark all unknown groups as killed." | |
1992 ;; First make sure active file has been read. | |
1993 (unless (gnus-read-active-file-p) | |
1994 (let ((gnus-read-active-file t)) | |
1995 (gnus-read-active-file))) | |
1996 (unless gnus-killed-hashtb | |
1997 (gnus-make-hashtable-from-killed)) | |
1998 ;; Go through all newsgroups that are known to Gnus - enlarge kill list. | |
1999 (mapatoms | |
2000 (lambda (sym) | |
2001 (let ((groups 0) | |
2002 (group (symbol-name sym))) | |
2003 (if (or (null group) | |
2004 (gnus-gethash group gnus-killed-hashtb) | |
2005 (gnus-gethash group gnus-newsrc-hashtb)) | |
2006 () | |
2007 (let ((do-sub (gnus-matches-options-n group))) | |
2008 (if (or (eq do-sub 'subscribe) (eq do-sub 'ignore)) | |
2009 () | |
2010 (setq groups (1+ groups)) | |
2011 (push group gnus-killed-list) | |
2012 (gnus-sethash group group gnus-killed-hashtb)))))) | |
2013 gnus-active-hashtb) | |
2014 (gnus-dribble-touch)) | |
2015 | |
2016 ;; Get the active file(s) from the backend(s). | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19910
diff
changeset
|
2017 (defun gnus-read-active-file (&optional force not-native) |
17493 | 2018 (gnus-group-set-mode-line) |
2019 (let ((methods | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2020 (mapcar |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2021 (lambda (m) (if (stringp m) (gnus-server-get-method nil m) m)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2022 (append |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2023 (if (and (not not-native) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2024 (gnus-check-server gnus-select-method)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2025 ;; The native server is available. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2026 (cons gnus-select-method gnus-secondary-select-methods) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2027 ;; The native server is down, so we just do the |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2028 ;; secondary ones. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2029 gnus-secondary-select-methods) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2030 ;; Also read from the archive server. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2031 (when (gnus-archive-server-wanted-p) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2032 (list "archive"))))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2033 method) |
17493 | 2034 (setq gnus-have-read-active-file nil) |
110410
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
2035 (with-current-buffer nntp-server-buffer |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2036 (while (setq method (pop methods)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2037 ;; Only do each method once, in case the methods appear more |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2038 ;; than once in this list. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2039 (unless (member method methods) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2040 (if (or debug-on-error debug-on-quit) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2041 (gnus-read-active-file-1 method force) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2042 (condition-case () |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2043 (gnus-read-active-file-1 method force) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2044 ;; We catch C-g so that we can continue past servers |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2045 ;; that do not respond. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2046 (quit |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2047 (message "Quit reading the active file") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2048 nil)))))))) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2049 |
110299
593e2b90e58b
gnus-start.el (gnus-read-active-for-groups): Check only subscribed groups.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110289
diff
changeset
|
2050 (defun gnus-read-active-file-1 (method force &optional infos) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2051 (let (where mesg) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2052 (setq where (nth 1 method) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2053 mesg (format "Reading active file%s via %s..." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2054 (if (and where (not (zerop (length where)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2055 (concat " from " where) "") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2056 (car method))) |
110433
33cf78a271ef
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110428
diff
changeset
|
2057 (gnus-message 5 "%s" mesg) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2058 (when (gnus-check-server method) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2059 ;; Request that the backend scan its incoming messages. |
110306
838fb634d1b0
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110299
diff
changeset
|
2060 (when (and (or (and gnus-agent |
838fb634d1b0
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110299
diff
changeset
|
2061 (gnus-online method)) |
838fb634d1b0
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110299
diff
changeset
|
2062 (not gnus-agent)) |
110189
821c596efa5f
Rewrite the Gnus group activation method to be more efficient; nnmh.el (nnmh-request-list-1): Fix up the recursion behavior; Add more changes related to the new methodology for requesting backend data.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110111
diff
changeset
|
2063 (gnus-check-backend-function 'request-scan (car method))) |
110486
1ad1adb298a3
Merge Changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110465
diff
changeset
|
2064 (gnus-request-scan nil method)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2065 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2066 ((and (eq gnus-read-active-file 'some) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2067 (gnus-check-backend-function 'retrieve-groups (car method)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2068 (not force)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2069 (let ((newsrc (cdr gnus-newsrc-alist)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2070 (gmethod (gnus-server-get-method nil method)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2071 groups info) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2072 (while (setq info (pop newsrc)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2073 (when (inline |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2074 (gnus-server-equal |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2075 (inline |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2076 (gnus-find-method-for-group |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2077 (gnus-info-group info) info)) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2078 gmethod)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2079 (push (gnus-group-real-name (gnus-info-group info)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2080 groups))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2081 (gnus-read-active-file-2 groups method))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2082 ((null method) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2083 t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2084 (t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2085 (if (not (gnus-request-list method)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2086 (unless (equal method gnus-message-archive-method) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2087 (gnus-error 1 "Cannot read active file from %s server" |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2088 (car method))) |
110433
33cf78a271ef
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110428
diff
changeset
|
2089 (gnus-message 5 "%s" mesg) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2090 (gnus-active-to-gnus-format method gnus-active-hashtb nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2091 ;; We mark this active file as read. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2092 (push method gnus-have-read-active-file) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2093 (gnus-message 5 "%sdone" mesg))))))) |
17493 | 2094 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2095 (defun gnus-read-active-file-2 (groups method) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2096 "Read an active file for GROUPS in METHOD using `gnus-retrieve-groups'." |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2097 (when groups |
110410
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
2098 (with-current-buffer nntp-server-buffer |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2099 (gnus-check-server method) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2100 (let ((list-type (gnus-retrieve-groups groups method))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2101 (cond ((not list-type) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2102 (gnus-error |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2103 1.2 "Cannot read partial active file from %s server." |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2104 (car method))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2105 ((eq list-type 'active) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2106 (gnus-active-to-gnus-format method gnus-active-hashtb nil t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2107 (t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2108 (gnus-groups-to-gnus-format method gnus-active-hashtb t))))))) |
17493 | 2109 |
2110 ;; Read an active file and place the results in `gnus-active-hashtb'. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
2111 (defun gnus-active-to-gnus-format (&optional method hashtb ignore-errors |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
2112 real-active) |
17493 | 2113 (unless method |
2114 (setq method gnus-select-method)) | |
2115 (let ((cur (current-buffer)) | |
2116 (hashtb (or hashtb | |
2117 (if (and gnus-active-hashtb | |
2118 (not (equal method gnus-select-method))) | |
2119 gnus-active-hashtb | |
2120 (setq gnus-active-hashtb | |
2121 (if (equal method gnus-select-method) | |
2122 (gnus-make-hashtable | |
2123 (count-lines (point-min) (point-max))) | |
86225 | 2124 (gnus-make-hashtable 4096)))))) |
2125 group max min) | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19910
diff
changeset
|
2126 ;; Delete unnecessary lines. |
17493 | 2127 (goto-char (point-min)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2128 (cond |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2129 ((string= gnus-ignored-newsgroups "") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2130 (delete-matching-lines "^to\\.")) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2131 (t |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2132 (delete-matching-lines (concat "^to\\.\\|" gnus-ignored-newsgroups)))) |
17493 | 2133 |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2134 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2135 (unless (re-search-forward "[\\\"]" nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2136 ;; Make the group names readable as a lisp expression even if they |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2137 ;; contain special characters. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2138 (goto-char (point-max)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2139 (while (re-search-backward "[][';?()#]" nil t) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2140 (insert ?\\))) |
17493 | 2141 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
2142 ;; Let the Gnus agent save the active file. |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2143 (when (and gnus-agent real-active (gnus-online method)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
2144 (gnus-agent-save-active method)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
2145 |
17493 | 2146 ;; If these are groups from a foreign select method, we insert the |
2147 ;; group prefix in front of the group names. | |
19969
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19910
diff
changeset
|
2148 (when (not (gnus-server-equal |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19910
diff
changeset
|
2149 (gnus-server-get-method nil method) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19910
diff
changeset
|
2150 (gnus-server-get-method nil gnus-select-method))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19910
diff
changeset
|
2151 (let ((prefix (gnus-group-prefixed-name "" method))) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19910
diff
changeset
|
2152 (goto-char (point-min)) |
5f1ab3dd344d
*** empty log message ***
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
19910
diff
changeset
|
2153 (while (and (not (eobp)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2154 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2155 (when (= (following-char) ?\") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2156 (forward-char 1)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2157 (insert prefix) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2158 (zerop (forward-line 1))))))) |
17493 | 2159 ;; Store the active file in a hash table. |
86225 | 2160 ;; Use a unibyte buffer in order to make `read' read non-ASCII |
2161 ;; group names (which have been encoded) as unibyte strings. | |
2162 (mm-with-unibyte-buffer | |
2163 (insert-buffer-substring cur) | |
2164 (setq cur (current-buffer)) | |
2165 (goto-char (point-min)) | |
17493 | 2166 (while (not (eobp)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2167 (condition-case () |
17493 | 2168 (progn |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
2169 (narrow-to-region (point) (point-at-eol)) |
17493 | 2170 ;; group gets set to a symbol interned in the hash table |
2171 ;; (what a hack!!) - jwz | |
2172 (setq group (let ((obarray hashtb)) (read cur))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2173 ;; ### The extended group name scheme makes |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2174 ;; the previous optimization strategy sort of pointless... |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2175 (when (stringp group) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2176 (setq group (intern group hashtb))) |
17493 | 2177 (if (and (numberp (setq max (read cur))) |
2178 (numberp (setq min (read cur))) | |
2179 (progn | |
2180 (skip-chars-forward " \t") | |
2181 (not | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2182 (or (eq (char-after) ?=) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2183 (eq (char-after) ?x) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2184 (eq (char-after) ?j))))) |
17493 | 2185 (progn |
2186 (set group (cons min max)) | |
2187 ;; if group is moderated, stick in moderation table | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2188 (when (eq (char-after) ?m) |
17493 | 2189 (unless gnus-moderated-hashtb |
2190 (setq gnus-moderated-hashtb (gnus-make-hashtable))) | |
2191 (gnus-sethash (symbol-name group) t | |
2192 gnus-moderated-hashtb))) | |
2193 (set group nil))) | |
2194 (error | |
2195 (and group | |
2196 (symbolp group) | |
2197 (set group nil)) | |
2198 (unless ignore-errors | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2199 (gnus-message 3 "Warning - invalid active: %s" |
17493 | 2200 (buffer-substring |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
2201 (point-at-bol) (point-at-eol)))))) |
17493 | 2202 (widen) |
2203 (forward-line 1))))) | |
2204 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
2205 (defun gnus-groups-to-gnus-format (method &optional hashtb real-active) |
17493 | 2206 ;; Parse a "groups" active file. |
2207 (let ((cur (current-buffer)) | |
2208 (hashtb (or hashtb | |
2209 (if (and method gnus-active-hashtb) | |
2210 gnus-active-hashtb | |
2211 (setq gnus-active-hashtb | |
2212 (gnus-make-hashtable | |
2213 (count-lines (point-min) (point-max))))))) | |
2214 (prefix (and method | |
2215 (not (gnus-server-equal | |
2216 (gnus-server-get-method nil method) | |
2217 (gnus-server-get-method nil gnus-select-method))) | |
2218 (gnus-group-prefixed-name "" method)))) | |
2219 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
2220 ;; Let the Gnus agent save the active file. |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2221 (if (and gnus-agent |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2222 real-active |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2223 (gnus-online method) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2224 (gnus-agent-method-p method)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2225 (progn |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2226 (gnus-agent-save-active method) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2227 (gnus-active-to-gnus-format method hashtb nil real-active)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2228 |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2229 (goto-char (point-min)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2230 ;; We split this into to separate loops, one with the prefix |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2231 ;; and one without to speed the reading up somewhat. |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2232 (if prefix |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2233 (let (min max opoint group) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2234 (while (not (eobp)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2235 (condition-case () |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2236 (progn |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2237 (read cur) (read cur) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2238 (setq min (read cur) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2239 max (read cur) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2240 opoint (point)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2241 (skip-chars-forward " \t") |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2242 (insert prefix) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2243 (goto-char opoint) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2244 (set (let ((obarray hashtb)) (read cur)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2245 (cons min max))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2246 (error (and group (symbolp group) (set group nil)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2247 (forward-line 1))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2248 (let (min max group) |
17493 | 2249 (while (not (eobp)) |
2250 (condition-case () | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2251 (when (eq (char-after) ?2) |
17493 | 2252 (read cur) (read cur) |
2253 (setq min (read cur) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2254 max (read cur)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2255 (set (setq group (let ((obarray hashtb)) (read cur))) |
17493 | 2256 (cons min max))) |
2257 (error (and group (symbolp group) (set group nil)))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2258 (forward-line 1))))))) |
17493 | 2259 |
2260 (defun gnus-read-newsrc-file (&optional force) | |
2261 "Read startup file. | |
2262 If FORCE is non-nil, the .newsrc file is read." | |
2263 ;; Reset variables that might be defined in the .newsrc.eld file. | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2264 (let ((variables (remove 'gnus-format-specs gnus-variable-list))) |
17493 | 2265 (while variables |
2266 (set (car variables) nil) | |
2267 (setq variables (cdr variables)))) | |
2268 (let* ((newsrc-file gnus-current-startup-file) | |
2269 (quick-file (concat newsrc-file ".el"))) | |
2270 (save-excursion | |
2271 ;; We always load the .newsrc.eld file. If always contains | |
2272 ;; much information that can not be gotten from the .newsrc | |
2273 ;; file (ticked articles, killed groups, foreign methods, etc.) | |
2274 (gnus-read-newsrc-el-file quick-file) | |
2275 | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2276 (when (and gnus-read-newsrc-file |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2277 (file-exists-p gnus-current-startup-file) |
17493 | 2278 (or force |
2279 (and (file-newer-than-file-p newsrc-file quick-file) | |
2280 (file-newer-than-file-p newsrc-file | |
2281 (concat quick-file "d"))) | |
2282 (not gnus-newsrc-alist))) | |
2283 ;; We read the .newsrc file. Note that if there if a | |
2284 ;; .newsrc.eld file exists, it has already been read, and | |
2285 ;; the `gnus-newsrc-hashtb' has been created. While reading | |
2286 ;; the .newsrc file, Gnus will only use the information it | |
2287 ;; can find there for changing the data already read - | |
2288 ;; i. e., reading the .newsrc file will not trash the data | |
2289 ;; already read (except for read articles). | |
2290 (save-excursion | |
2291 (gnus-message 5 "Reading %s..." newsrc-file) | |
2292 (set-buffer (nnheader-find-file-noselect newsrc-file)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2293 (buffer-disable-undo) |
17493 | 2294 (gnus-newsrc-to-gnus-format) |
2295 (kill-buffer (current-buffer)) | |
2296 (gnus-message 5 "Reading %s...done" newsrc-file))) | |
2297 | |
2298 ;; Convert old to new. | |
2299 (gnus-convert-old-newsrc)))) | |
2300 | |
2301 (defun gnus-convert-old-newsrc () | |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2302 "Convert old newsrc formats into the current format, if needed." |
17493 | 2303 (let ((fcv (and gnus-newsrc-file-version |
57723
6a65cb24e1be
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-640
Miles Bader <miles@gnu.org>
parents:
57640
diff
changeset
|
2304 (gnus-continuum-version gnus-newsrc-file-version))) |
6a65cb24e1be
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-640
Miles Bader <miles@gnu.org>
parents:
57640
diff
changeset
|
2305 (gcv (gnus-continuum-version))) |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2306 (when fcv |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2307 ;; A newsrc file was loaded. |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2308 (let (prompt-displayed |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2309 (converters |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2310 (sort |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2311 (mapcar (lambda (date-func) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2312 (cons (gnus-continuum-version (car date-func)) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2313 date-func)) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2314 ;; This is a list of converters that must be run |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2315 ;; to bring the newsrc file up to the current |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2316 ;; version. If you create an incompatibility |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2317 ;; with older versions, you should create an |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2318 ;; entry here. The entry should consist of the |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2319 ;; current gnus version (hardcoded so that it |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2320 ;; doesn't change with each release) and the |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2321 ;; function that must be applied to convert the |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2322 ;; previous version into the current version. |
58221
410d0a597e9d
(gnus-convert-old-newsrc): Assign
Reiner Steib <Reiner.Steib@gmx.de>
parents:
57856
diff
changeset
|
2323 '(("September Gnus v0.1" nil |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2324 gnus-convert-old-ticks) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2325 ("Oort Gnus v0.08" "legacy-gnus-agent" |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2326 gnus-agent-convert-to-compressed-agentview) |
58221
410d0a597e9d
(gnus-convert-old-newsrc): Assign
Reiner Steib <Reiner.Steib@gmx.de>
parents:
57856
diff
changeset
|
2327 ("Gnus v5.10.7" "legacy-gnus-agent" |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2328 gnus-agent-unlist-expire-days) |
58221
410d0a597e9d
(gnus-convert-old-newsrc): Assign
Reiner Steib <Reiner.Steib@gmx.de>
parents:
57856
diff
changeset
|
2329 ("Gnus v5.10.7" "legacy-gnus-agent" |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2330 gnus-agent-unhook-expire-days))) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2331 #'car-less-than-car))) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2332 ;; Skip converters older than the file version |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2333 (while (and converters (>= fcv (caar converters))) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2334 (pop converters)) |
17493 | 2335 |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2336 ;; Perform converters to bring older version up to date. |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2337 (when (and converters (< fcv (caar converters))) |
57640
c660fc46d193
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-633
Miles Bader <miles@gnu.org>
parents:
57617
diff
changeset
|
2338 (while (and converters (< fcv (caar converters)) |
57723
6a65cb24e1be
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-640
Miles Bader <miles@gnu.org>
parents:
57640
diff
changeset
|
2339 (<= (caar converters) gcv)) |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2340 (let* ((converter-spec (pop converters)) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2341 (convert-to (nth 1 converter-spec)) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2342 (load-from (nth 2 converter-spec)) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2343 (func (nth 3 converter-spec))) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2344 (when (and load-from |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2345 (not (fboundp func))) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2346 (load load-from t)) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2347 (or prompt-displayed |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2348 (not (gnus-convert-converter-needs-prompt func)) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2349 (while (let (c |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2350 (cursor-in-echo-area t) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2351 (echo-keystrokes 0)) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2352 (message "Convert gnus from version '%s' to '%s'? (n/y/?)" |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2353 gnus-newsrc-file-version gnus-version) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2354 (setq c (read-char-exclusive)) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2355 |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2356 (cond ((or (eq c ?n) (eq c ?N)) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2357 (error "Can not start gnus without converting")) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2358 ((or (eq c ?y) (eq c ?Y)) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2359 (setq prompt-displayed t) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2360 nil) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2361 ((eq c ?\?) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2362 (message "This conversion is irreversible. \ |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2363 To be safe, you should backup your files before proceeding.") |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2364 (sit-for 5) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2365 t) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2366 (t |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2367 (gnus-message 3 "Ignoring unexpected input") |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2368 (sit-for 3) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2369 t))))) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2370 |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2371 (funcall func convert-to))) |
59996
aac0a33f5772
Change release version from 21.4 to 22.1 throughout.
Kim F. Storm <storm@cua.dk>
parents:
58959
diff
changeset
|
2372 (gnus-dribble-enter |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2373 (format ";Converted gnus from version '%s' to '%s'." |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2374 gnus-newsrc-file-version gnus-version))))))) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2375 |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2376 (defun gnus-convert-mark-converter-prompt (converter no-prompt) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2377 "Indicate whether CONVERTER requires gnus-convert-old-newsrc to |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2378 display the conversion prompt. NO-PROMPT may be nil (prompt), |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2379 t (no prompt), or any form that can be called as a function. |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2380 The form should return either t or nil." |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2381 (put converter 'gnus-convert-no-prompt no-prompt)) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2382 |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2383 (defun gnus-convert-converter-needs-prompt (converter) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2384 (let ((no-prompt (get converter 'gnus-convert-no-prompt))) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2385 (not (if (memq no-prompt '(t nil)) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2386 no-prompt |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2387 (funcall no-prompt))))) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2388 |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2389 (defun gnus-convert-old-ticks (converting-to) |
17493 | 2390 (let ((newsrc (cdr gnus-newsrc-alist)) |
2391 marks info dormant ticked) | |
2392 (while (setq info (pop newsrc)) | |
2393 (when (setq marks (gnus-info-marks info)) | |
2394 (setq dormant (cdr (assq 'dormant marks)) | |
2395 ticked (cdr (assq 'tick marks))) | |
2396 (when (or dormant ticked) | |
2397 (gnus-info-set-read | |
2398 info | |
2399 (gnus-add-to-range | |
2400 (gnus-info-read info) | |
2401 (nconc (gnus-uncompress-range dormant) | |
2402 (gnus-uncompress-range ticked))))))))) | |
2403 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2404 (defun gnus-load (file) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2405 "Load FILE, but in such a way that read errors can be reported." |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2406 (with-temp-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2407 (insert-file-contents file) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2408 (while (not (eobp)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2409 (condition-case type |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2410 (let ((form (read (current-buffer)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2411 (eval form)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2412 (error |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2413 (unless (eq (car type) 'end-of-file) |
87149
11bb5a31a28a
(gnus-load): Rename local variable to avoid confusion.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
87145
diff
changeset
|
2414 (let ((errmsg (format "Error in %s line %d" file |
87151
f6f228f943b2
Fix breakage from last change.
Deepak Goel <deego@gnufans.org>
parents:
87149
diff
changeset
|
2415 (count-lines (point-min) (point))))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2416 (ding) |
87149
11bb5a31a28a
(gnus-load): Rename local variable to avoid confusion.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
87145
diff
changeset
|
2417 (unless (gnus-yes-or-no-p (concat errmsg "; continue? ")) |
11bb5a31a28a
(gnus-load): Rename local variable to avoid confusion.
Reiner Steib <Reiner.Steib@gmx.de>
parents:
87145
diff
changeset
|
2418 (error "%s" errmsg))))))))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2419 |
17493 | 2420 (defun gnus-read-newsrc-el-file (file) |
2421 (let ((ding-file (concat file "d"))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2422 (when (file-exists-p ding-file) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2423 ;; We always, always read the .eld file. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2424 (gnus-message 5 "Reading %s..." ding-file) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2425 (let (gnus-newsrc-assoc) |
89971
cce1c0ee76ee
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-36
Miles Bader <miles@gnu.org>
diff
changeset
|
2426 (gnus-load ding-file) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2427 ;; Older versions of `gnus-format-specs' are no longer valid |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2428 ;; in Oort Gnus 0.01. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2429 (let ((version |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2430 (and gnus-newsrc-file-version |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2431 (gnus-continuum-version gnus-newsrc-file-version)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2432 (when (or (not version) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2433 (< version 5.090009)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2434 (setq gnus-format-specs gnus-default-format-specs))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2435 (when gnus-newsrc-assoc |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2436 (setq gnus-newsrc-alist gnus-newsrc-assoc)))) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
2437 (dolist (elem gnus-newsrc-alist) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
2438 (setcar elem (mm-string-as-unibyte (car elem)))) |
17493 | 2439 (gnus-make-hashtable-from-newsrc-alist) |
2440 (when (file-newer-than-file-p file ding-file) | |
2441 ;; Old format quick file | |
2442 (gnus-message 5 "Reading %s..." file) | |
2443 ;; The .el file is newer than the .eld file, so we read that one | |
2444 ;; as well. | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2445 (gnus-read-old-newsrc-el-file file))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2446 (gnus-run-hooks 'gnus-read-newsrc-el-hook)) |
17493 | 2447 |
2448 ;; Parse the old-style quick startup file | |
2449 (defun gnus-read-old-newsrc-el-file (file) | |
2450 (let (newsrc killed marked group m info) | |
2451 (prog1 | |
2452 (let ((gnus-killed-assoc nil) | |
2453 gnus-marked-assoc gnus-newsrc-alist gnus-newsrc-assoc) | |
2454 (prog1 | |
2455 (ignore-errors | |
2456 (load file t t t)) | |
2457 (setq newsrc gnus-newsrc-assoc | |
2458 killed gnus-killed-assoc | |
2459 marked gnus-marked-assoc))) | |
2460 (setq gnus-newsrc-alist nil) | |
2461 (while (setq group (pop newsrc)) | |
2462 (if (setq info (gnus-get-info (car group))) | |
2463 (progn | |
2464 (gnus-info-set-read info (cddr group)) | |
2465 (gnus-info-set-level | |
2466 info (if (nth 1 group) gnus-level-default-subscribed | |
2467 gnus-level-default-unsubscribed)) | |
2468 (push info gnus-newsrc-alist)) | |
2469 (push (setq info | |
2470 (list (car group) | |
2471 (if (nth 1 group) gnus-level-default-subscribed | |
2472 gnus-level-default-unsubscribed) | |
2473 (cddr group))) | |
2474 gnus-newsrc-alist)) | |
2475 ;; Copy marks into info. | |
2476 (when (setq m (assoc (car group) marked)) | |
2477 (unless (nthcdr 3 info) | |
2478 (nconc info (list nil))) | |
2479 (gnus-info-set-marks | |
2480 info (list (cons 'tick (gnus-compress-sequence | |
2481 (sort (cdr m) '<) t)))))) | |
2482 (setq newsrc killed) | |
2483 (while newsrc | |
2484 (setcar newsrc (caar newsrc)) | |
2485 (setq newsrc (cdr newsrc))) | |
2486 (setq gnus-killed-list killed)) | |
2487 ;; The .el file version of this variable does not begin with | |
2488 ;; "options", while the .eld version does, so we just add it if it | |
2489 ;; isn't there. | |
2490 (when | |
2491 gnus-newsrc-options | |
2492 (when (not (string-match "^ *options" gnus-newsrc-options)) | |
2493 (setq gnus-newsrc-options (concat "options " gnus-newsrc-options))) | |
2494 (when (not (string-match "\n$" gnus-newsrc-options)) | |
2495 (setq gnus-newsrc-options (concat gnus-newsrc-options "\n"))) | |
2496 ;; Finally, if we read some options lines, we parse them. | |
2497 (unless (string= gnus-newsrc-options "") | |
2498 (gnus-newsrc-parse-options gnus-newsrc-options))) | |
2499 | |
2500 (setq gnus-newsrc-alist (nreverse gnus-newsrc-alist)) | |
2501 (gnus-make-hashtable-from-newsrc-alist))) | |
2502 | |
2503 (defun gnus-make-newsrc-file (file) | |
2504 "Make server dependent file name by catenating FILE and server host name." | |
2505 (let* ((file (expand-file-name file nil)) | |
2506 (real-file (concat file "-" (nth 1 gnus-select-method)))) | |
2507 (if (or (file-exists-p real-file) | |
2508 (file-exists-p (concat real-file ".el")) | |
2509 (file-exists-p (concat real-file ".eld"))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
2510 real-file |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
2511 file))) |
17493 | 2512 |
2513 (defun gnus-newsrc-to-gnus-format () | |
2514 (setq gnus-newsrc-options "") | |
2515 (setq gnus-newsrc-options-n nil) | |
2516 | |
2517 (unless gnus-active-hashtb | |
2518 (setq gnus-active-hashtb (gnus-make-hashtable 4096))) | |
2519 (let ((buf (current-buffer)) | |
2520 (already-read (> (length gnus-newsrc-alist) 1)) | |
2521 group subscribed options-symbol newsrc Options-symbol | |
2522 symbol reads num1) | |
2523 (goto-char (point-min)) | |
2524 ;; We intern the symbol `options' in the active hashtb so that we | |
2525 ;; can `eq' against it later. | |
2526 (set (setq options-symbol (intern "options" gnus-active-hashtb)) nil) | |
2527 (set (setq Options-symbol (intern "Options" gnus-active-hashtb)) nil) | |
2528 | |
2529 (while (not (eobp)) | |
2530 ;; We first read the first word on the line by narrowing and | |
2531 ;; then reading into `gnus-active-hashtb'. Most groups will | |
2532 ;; already exist in that hashtb, so this will save some string | |
2533 ;; space. | |
2534 (narrow-to-region | |
2535 (point) | |
2536 (progn (skip-chars-forward "^ \t!:\n") (point))) | |
2537 (goto-char (point-min)) | |
2538 (setq symbol | |
2539 (and (/= (point-min) (point-max)) | |
2540 (let ((obarray gnus-active-hashtb)) (read buf)))) | |
2541 (widen) | |
2542 ;; Now, the symbol we have read is either `options' or a group | |
2543 ;; name. If it is an options line, we just add it to a string. | |
2544 (cond | |
2545 ((or (eq symbol options-symbol) | |
2546 (eq symbol Options-symbol)) | |
2547 (setq gnus-newsrc-options | |
2548 ;; This concating is quite inefficient, but since our | |
2549 ;; thorough studies show that approx 99.37% of all | |
2550 ;; .newsrc files only contain a single options line, we | |
2551 ;; don't give a damn, frankly, my dear. | |
2552 (concat gnus-newsrc-options | |
2553 (buffer-substring | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
2554 (point-at-bol) |
17493 | 2555 ;; Options may continue on the next line. |
2556 (or (and (re-search-forward "^[^ \t]" nil 'move) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
2557 (point-at-bol)) |
17493 | 2558 (point))))) |
2559 (forward-line -1)) | |
2560 (symbol | |
2561 ;; Group names can be just numbers. | |
2562 (when (numberp symbol) | |
2563 (setq symbol (intern (int-to-string symbol) gnus-active-hashtb))) | |
2564 (unless (boundp symbol) | |
2565 (set symbol nil)) | |
2566 ;; It was a group name. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2567 (setq subscribed (eq (char-after) ?:) |
17493 | 2568 group (symbol-name symbol) |
2569 reads nil) | |
2570 (if (eolp) | |
2571 ;; If the line ends here, this is clearly a buggy line, so | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2572 ;; we put point a the beginning of line and let the cond |
17493 | 2573 ;; below do the error handling. |
2574 (beginning-of-line) | |
2575 ;; We skip to the beginning of the ranges. | |
2576 (skip-chars-forward "!: \t")) | |
2577 ;; We are now at the beginning of the list of read articles. | |
2578 ;; We read them range by range. | |
2579 (while | |
2580 (cond | |
2581 ((looking-at "[0-9]+") | |
2582 ;; We narrow and read a number instead of buffer-substring/ | |
62907
88db2adda4b7
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-339
Miles Bader <miles@gnu.org>
parents:
60824
diff
changeset
|
2583 ;; string-to-number because it's faster. narrow/widen is |
17493 | 2584 ;; faster than save-restriction/narrow, and save-restriction |
2585 ;; produces a garbage object. | |
2586 (setq num1 (progn | |
2587 (narrow-to-region (match-beginning 0) (match-end 0)) | |
2588 (read buf))) | |
2589 (widen) | |
2590 ;; If the next character is a dash, then this is a range. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2591 (if (eq (char-after) ?-) |
17493 | 2592 (progn |
2593 ;; We read the upper bound of the range. | |
2594 (forward-char 1) | |
2595 (if (not (looking-at "[0-9]+")) | |
2596 ;; This is a buggy line, by we pretend that | |
2597 ;; it's kinda OK. Perhaps the user should be | |
2598 ;; dinged? | |
2599 (push num1 reads) | |
2600 (push | |
2601 (cons num1 | |
2602 (progn | |
2603 (narrow-to-region (match-beginning 0) | |
2604 (match-end 0)) | |
2605 (read buf))) | |
2606 reads) | |
2607 (widen))) | |
2608 ;; It was just a simple number, so we add it to the | |
2609 ;; list of ranges. | |
2610 (push num1 reads)) | |
2611 ;; If the next char in ?\n, then we have reached the end | |
2612 ;; of the line and return nil. | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2613 (not (eq (char-after) ?\n))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2614 ((eq (char-after) ?\n) |
17493 | 2615 ;; End of line, so we end. |
2616 nil) | |
2617 (t | |
2618 ;; Not numbers and not eol, so this might be a buggy | |
2619 ;; line... | |
2620 (unless (eobp) | |
2621 ;; If it was eob instead of ?\n, we allow it. | |
2622 ;; The line was buggy. | |
2623 (setq group nil) | |
2624 (gnus-error 3.1 "Mangled line: %s" | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
2625 (buffer-substring (point-at-bol) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
2626 (point-at-eol)))) |
17493 | 2627 nil)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2628 ;; Skip past ", ". Spaces are invalid in these ranges, but |
17493 | 2629 ;; we allow them, because it's a common mistake to put a |
2630 ;; space after the comma. | |
2631 (skip-chars-forward ", ")) | |
2632 | |
2633 ;; We have already read .newsrc.eld, so we gently update the | |
2634 ;; data in the hash table with the information we have just | |
2635 ;; read. | |
2636 (when group | |
2637 (let ((info (gnus-get-info group)) | |
2638 level) | |
2639 (if info | |
2640 ;; There is an entry for this file in the alist. | |
2641 (progn | |
2642 (gnus-info-set-read info (nreverse reads)) | |
2643 ;; We update the level very gently. In fact, we | |
2644 ;; only change it if there's been a status change | |
2645 ;; from subscribed to unsubscribed, or vice versa. | |
2646 (setq level (gnus-info-level info)) | |
2647 (cond ((and (<= level gnus-level-subscribed) | |
2648 (not subscribed)) | |
2649 (setq level (if reads | |
2650 gnus-level-default-unsubscribed | |
2651 (1+ gnus-level-default-unsubscribed)))) | |
2652 ((and (> level gnus-level-subscribed) subscribed) | |
2653 (setq level gnus-level-default-subscribed))) | |
2654 (gnus-info-set-level info level)) | |
2655 ;; This is a new group. | |
2656 (setq info (list group | |
2657 (if subscribed | |
2658 gnus-level-default-subscribed | |
2659 (if reads | |
2660 (1+ gnus-level-subscribed) | |
2661 gnus-level-default-unsubscribed)) | |
2662 (nreverse reads)))) | |
2663 (push info newsrc))))) | |
2664 (forward-line 1)) | |
2665 | |
2666 (setq newsrc (nreverse newsrc)) | |
2667 | |
2668 (if (not already-read) | |
2669 () | |
2670 ;; We now have two newsrc lists - `newsrc', which is what we | |
2671 ;; have read from .newsrc, and `gnus-newsrc-alist', which is | |
2672 ;; what we've read from .newsrc.eld. We have to merge these | |
2673 ;; lists. We do this by "attaching" any (foreign) groups in the | |
2674 ;; gnus-newsrc-alist to the (native) group that precedes them. | |
2675 (let ((rc (cdr gnus-newsrc-alist)) | |
2676 (prev gnus-newsrc-alist) | |
2677 entry mentry) | |
2678 (while rc | |
2679 (or (null (nth 4 (car rc))) ; It's a native group. | |
2680 (assoc (caar rc) newsrc) ; It's already in the alist. | |
2681 (if (setq entry (assoc (caar prev) newsrc)) | |
2682 (setcdr (setq mentry (memq entry newsrc)) | |
2683 (cons (car rc) (cdr mentry))) | |
2684 (push (car rc) newsrc))) | |
2685 (setq prev rc | |
2686 rc (cdr rc))))) | |
2687 | |
2688 (setq gnus-newsrc-alist newsrc) | |
2689 ;; We make the newsrc hashtb. | |
2690 (gnus-make-hashtable-from-newsrc-alist) | |
2691 | |
2692 ;; Finally, if we read some options lines, we parse them. | |
2693 (unless (string= gnus-newsrc-options "") | |
2694 (gnus-newsrc-parse-options gnus-newsrc-options)))) | |
2695 | |
2696 ;; Parse options lines to find "options -n !all rec.all" and stuff. | |
2697 ;; The return value will be a list on the form | |
2698 ;; ((regexp1 . ignore) | |
2699 ;; (regexp2 . subscribe)...) | |
2700 ;; When handling new newsgroups, groups that match a `ignore' regexp | |
2701 ;; will be ignored, and groups that match a `subscribe' regexp will be | |
2702 ;; subscribed. A line like | |
2703 ;; options -n !all rec.all | |
2704 ;; will lead to a list that looks like | |
2705 ;; (("^rec\\..+" . subscribe) | |
2706 ;; ("^.+" . ignore)) | |
2707 ;; So all "rec.*" groups will be subscribed, while all the other | |
2708 ;; groups will be ignored. Note that "options -n !all rec.all" is very | |
2709 ;; different from "options -n rec.all !all". | |
2710 (defun gnus-newsrc-parse-options (options) | |
2711 (let (out eol) | |
2712 (save-excursion | |
2713 (gnus-set-work-buffer) | |
2714 (insert (regexp-quote options)) | |
2715 ;; First we treat all continuation lines. | |
2716 (goto-char (point-min)) | |
2717 (while (re-search-forward "\n[ \t]+" nil t) | |
2718 (replace-match " " t t)) | |
2719 ;; Then we transform all "all"s into ".+"s. | |
2720 (goto-char (point-min)) | |
2721 (while (re-search-forward "\\ball\\b" nil t) | |
2722 (replace-match ".+" t t)) | |
2723 (goto-char (point-min)) | |
2724 ;; We remove all other options than the "-n" ones. | |
2725 (while (re-search-forward "[ \t]-[^n][^-]*" nil t) | |
2726 (replace-match " ") | |
2727 (forward-char -1)) | |
2728 (goto-char (point-min)) | |
2729 | |
2730 ;; We are only interested in "options -n" lines - we | |
2731 ;; ignore the other option lines. | |
2732 (while (re-search-forward "[ \t]-n" nil t) | |
2733 (setq eol | |
2734 (or (save-excursion | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
2735 (and (re-search-forward "[ \t]-n" (point-at-eol) t) |
17493 | 2736 (- (point) 2))) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
2737 (point-at-eol))) |
17493 | 2738 ;; Search for all "words"... |
2739 (while (re-search-forward "[^ \t,\n]+" eol t) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2740 (if (eq (char-after (match-beginning 0)) ?!) |
17493 | 2741 ;; If the word begins with a bang (!), this is a "not" |
2742 ;; spec. We put this spec (minus the bang) and the | |
2743 ;; symbol `ignore' into the list. | |
2744 (push (cons (concat | |
2745 "^" (buffer-substring | |
2746 (1+ (match-beginning 0)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
2747 (match-end 0)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
2748 "\\($\\|\\.\\)") |
17493 | 2749 'ignore) |
2750 out) | |
2751 ;; There was no bang, so this is a "yes" spec. | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
2752 (push (cons (concat "^" (match-string 0) "\\($\\|\\.\\)") |
17493 | 2753 'subscribe) |
2754 out)))) | |
2755 | |
2756 (setq gnus-newsrc-options-n out)))) | |
2757 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2758 (eval-and-compile |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2759 (defalias 'gnus-long-file-names |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2760 (if (fboundp 'msdos-long-file-names) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2761 'msdos-long-file-names |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2762 (lambda () t)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2763 |
17493 | 2764 (defun gnus-save-newsrc-file (&optional force) |
2765 "Save .newsrc file." | |
2766 ;; Note: We cannot save .newsrc file if all newsgroups are removed | |
2767 ;; from the variable gnus-newsrc-alist. | |
2768 (when (and (or gnus-newsrc-alist gnus-killed-list) | |
2769 gnus-current-startup-file) | |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2770 ;; Save agent range limits for the currently active method. |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2771 (when gnus-agent |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2772 (gnus-agent-save-local force)) |
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2773 |
17493 | 2774 (save-excursion |
2775 (if (and (or gnus-use-dribble-file gnus-slave) | |
2776 (not force) | |
2777 (or (not gnus-dribble-buffer) | |
2778 (not (buffer-name gnus-dribble-buffer)) | |
110410
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
2779 (zerop (with-current-buffer gnus-dribble-buffer |
17493 | 2780 (buffer-size))))) |
2781 (gnus-message 4 "(No changes need to be saved)") | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
2782 (gnus-run-hooks 'gnus-save-newsrc-hook) |
17493 | 2783 (if gnus-slave |
2784 (gnus-slave-save-newsrc) | |
2785 ;; Save .newsrc. | |
2786 (when gnus-save-newsrc-file | |
2787 (gnus-message 8 "Saving %s..." gnus-current-startup-file) | |
2788 (gnus-gnus-to-newsrc-format) | |
2789 (gnus-message 8 "Saving %s...done" gnus-current-startup-file)) | |
57617
7fdc1df35f39
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-628
Miles Bader <miles@gnu.org>
parents:
57581
diff
changeset
|
2790 |
17493 | 2791 ;; Save .newsrc.eld. |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
2792 (set-buffer (gnus-get-buffer-create " *Gnus-newsrc*")) |
17493 | 2793 (make-local-variable 'version-control) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2794 (setq version-control gnus-backup-startup-file) |
17493 | 2795 (setq buffer-file-name |
2796 (concat gnus-current-startup-file ".eld")) | |
2797 (setq default-directory (file-name-directory buffer-file-name)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2798 (buffer-disable-undo) |
17493 | 2799 (erase-buffer) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2800 (gnus-message 5 "Saving %s.eld..." gnus-current-startup-file) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2801 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2802 (if gnus-save-startup-file-via-temp-buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2803 (let ((coding-system-for-write gnus-ding-file-coding-system) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2804 (standard-output (current-buffer))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2805 (gnus-gnus-to-quick-newsrc-format) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2806 (gnus-run-hooks 'gnus-save-quick-newsrc-hook) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2807 (save-buffer)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2808 (let ((coding-system-for-write gnus-ding-file-coding-system) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2809 (version-control gnus-backup-startup-file) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2810 (startup-file (concat gnus-current-startup-file ".eld")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2811 (working-dir (file-name-directory gnus-current-startup-file)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2812 working-file |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2813 (i -1)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2814 ;; Generate the name of a non-existent file. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2815 (while (progn (setq working-file |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2816 (format |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2817 (if (and (eq system-type 'ms-dos) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2818 (not (gnus-long-file-names))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2819 "%s#%d.tm#" ; MSDOS limits files to 8+3 |
97142 | 2820 "%s#tmp#%d") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2821 working-dir (setq i (1+ i)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2822 (file-exists-p working-file))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2823 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2824 (unwind-protect |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2825 (progn |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2826 (gnus-with-output-to-file working-file |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2827 (gnus-gnus-to-quick-newsrc-format) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2828 (gnus-run-hooks 'gnus-save-quick-newsrc-hook)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2829 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2830 ;; These bindings will mislead the current buffer |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2831 ;; into thinking that it is visiting the startup |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2832 ;; file. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2833 (let ((buffer-backed-up nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2834 (buffer-file-name startup-file) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2835 (file-precious-flag t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2836 (setmodes (file-modes startup-file))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2837 ;; Backup the current version of the startup file. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2838 (backup-buffer) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2839 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2840 ;; Replace the existing startup file with the temp file. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2841 (rename-file working-file startup-file t) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
2842 (gnus-set-file-modes startup-file setmodes))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2843 (condition-case nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2844 (delete-file working-file) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2845 (file-error nil))))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2846 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2847 (gnus-kill-buffer (current-buffer)) |
17493 | 2848 (gnus-message |
2849 5 "Saving %s.eld...done" gnus-current-startup-file)) | |
2850 (gnus-dribble-delete-file) | |
2851 (gnus-group-set-mode-line))))) | |
2852 | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2853 (defun gnus-gnus-to-quick-newsrc-format (&optional minimal name &rest specific-variables) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2854 "Print Gnus variables such as `gnus-newsrc-alist' in Lisp format." |
90605
40fcc895777b
(gnus-gnus-to-quick-newsrc-format): Use correct
Kenichi Handa <handa@m17n.org>
parents:
90533
diff
changeset
|
2855 (princ (format ";; -*- mode:emacs-lisp; coding: %s; -*-\n" |
89971
cce1c0ee76ee
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-36
Miles Bader <miles@gnu.org>
diff
changeset
|
2856 gnus-ding-file-coding-system)) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2857 (if name |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2858 (princ (format ";; %s\n" name)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2859 (princ ";; Gnus startup file.\n")) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2860 |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2861 (unless minimal |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2862 (princ "\ |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
2863 ;; Never delete this file -- if you want to force Gnus to read the |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
2864 ;; .newsrc file (if you have one), touch .newsrc instead.\n") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2865 (princ "(setq gnus-newsrc-file-version ") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2866 (princ (gnus-prin1-to-string gnus-version)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2867 (princ ")\n")) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2868 |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2869 (let* ((print-quoted t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2870 (print-readably t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2871 (print-escape-multibyte nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2872 (print-escape-nonascii t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2873 (print-length nil) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2874 (print-level nil) |
68129
6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Miles Bader <miles@gnu.org>
parents:
67643
diff
changeset
|
2875 (print-circle nil) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2876 (print-escape-newlines t) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2877 (gnus-killed-list |
17493 | 2878 (if (and gnus-save-killed-list |
2879 (stringp gnus-save-killed-list)) | |
2880 (gnus-strip-killed-list) | |
2881 gnus-killed-list)) | |
2882 (variables | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2883 (or specific-variables |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2884 (if gnus-save-killed-list gnus-variable-list |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2885 ;; Remove the `gnus-killed-list' from the list of variables |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2886 ;; to be saved, if required. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2887 (delq 'gnus-killed-list (copy-sequence gnus-variable-list))))) |
17493 | 2888 ;; Peel off the "dummy" group. |
2889 (gnus-newsrc-alist (cdr gnus-newsrc-alist)) | |
2890 variable) | |
2891 ;; Insert the variables into the file. | |
2892 (while variables | |
2893 (when (and (boundp (setq variable (pop variables))) | |
2894 (symbol-value variable)) | |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
2895 (princ "\n(setq ") |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2896 (princ (symbol-name variable)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2897 (princ " '") |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2898 (prin1 (symbol-value variable)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
2899 (princ ")\n"))))) |
17493 | 2900 |
2901 (defun gnus-strip-killed-list () | |
2902 "Return the killed list minus the groups that match `gnus-save-killed-list'." | |
2903 (let ((list gnus-killed-list) | |
2904 olist) | |
2905 (while list | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
2906 (when (string-match gnus-save-killed-list (car list)) |
17493 | 2907 (push (car list) olist)) |
2908 (pop list)) | |
2909 (nreverse olist))) | |
2910 | |
2911 (defun gnus-gnus-to-newsrc-format () | |
2912 ;; Generate and save the .newsrc file. | |
110410
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
2913 (with-current-buffer (create-file-buffer gnus-current-startup-file) |
17493 | 2914 (let ((newsrc (cdr gnus-newsrc-alist)) |
2915 (standard-output (current-buffer)) | |
2916 info ranges range method) | |
2917 (setq buffer-file-name gnus-current-startup-file) | |
2918 (setq default-directory (file-name-directory buffer-file-name)) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2919 (buffer-disable-undo) |
17493 | 2920 (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
|
2921 ;; Use a unibyte buffer since group names are unibyte strings; |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
2922 ;; in particular, non-ASCII group names are the ones encoded by |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
2923 ;; a certain coding system. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
2924 (mm-disable-multibyte) |
17493 | 2925 ;; Write options. |
2926 (when gnus-newsrc-options | |
2927 (insert gnus-newsrc-options)) | |
2928 ;; Write subscribed and unsubscribed. | |
2929 (while (setq info (pop newsrc)) | |
2930 ;; Don't write foreign groups to .newsrc. | |
2931 (when (or (null (setq method (gnus-info-method info))) | |
2932 (equal method "native") | |
2933 (inline (gnus-server-equal method gnus-select-method))) | |
2934 (insert (gnus-info-group info) | |
2935 (if (> (gnus-info-level info) gnus-level-subscribed) | |
2936 "!" ":")) | |
2937 (when (setq ranges (gnus-info-read info)) | |
2938 (insert " ") | |
2939 (if (not (listp (cdr ranges))) | |
2940 (if (= (car ranges) (cdr ranges)) | |
2941 (princ (car ranges)) | |
2942 (princ (car ranges)) | |
2943 (insert "-") | |
2944 (princ (cdr ranges))) | |
2945 (while (setq range (pop ranges)) | |
2946 (if (or (atom range) (= (car range) (cdr range))) | |
2947 (princ (or (and (atom range) range) (car range))) | |
2948 (princ (car range)) | |
2949 (insert "-") | |
2950 (princ (cdr range))) | |
2951 (when ranges | |
2952 (insert ","))))) | |
2953 (insert "\n"))) | |
2954 (make-local-variable 'version-control) | |
2955 (setq version-control 'never) | |
2956 ;; It has been reported that sometime the modtime on the .newsrc | |
2957 ;; file seems to be off. We really do want to overwrite it, so | |
2958 ;; we clear the modtime here before saving. It's a bit odd, | |
2959 ;; though... | |
2960 ;; sometimes the modtime clear isn't sufficient. most brute force: | |
2961 ;; delete the silly thing entirely first. but this fails to provide | |
2962 ;; such niceties as .newsrc~ creation. | |
2963 (if gnus-modtime-botch | |
2964 (delete-file gnus-startup-file) | |
2965 (clear-visited-file-modtime)) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
2966 (gnus-run-hooks 'gnus-save-standard-newsrc-hook) |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
2967 (let ((coding-system-for-write 'raw-text)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
2968 (save-buffer)) |
17493 | 2969 (kill-buffer (current-buffer))))) |
2970 | |
2971 | |
2972 ;;; | |
2973 ;;; Slave functions. | |
2974 ;;; | |
2975 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
2976 (defvar gnus-slave-mode nil) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
2977 |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
2978 (defun gnus-slave-mode () |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
2979 "Minor mode for slave Gnusae." |
108215
8264830363ca
Use define-minor-mode in Gnus where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
2980 ;; FIXME: gnus-slave-mode appears to never be set (i.e. it'll always be nil): |
8264830363ca
Use define-minor-mode in Gnus where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
2981 ;; Remove, or fix and use define-minor-mode. |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
2982 (add-minor-mode 'gnus-slave-mode " Slave" (make-sparse-keymap)) |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
2983 (gnus-run-hooks 'gnus-slave-mode-hook)) |
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
23103
diff
changeset
|
2984 |
17493 | 2985 (defun gnus-slave-save-newsrc () |
110410
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
2986 (with-current-buffer gnus-dribble-buffer |
17493 | 2987 (let ((slave-name |
44075
7782e54757bb
* mail-source.el (make-source-make-complex-temp-name): Use
ShengHuo ZHU <zsh@cs.rochester.edu>
parents:
42628
diff
changeset
|
2988 (mm-make-temp-file (concat gnus-current-startup-file "-slave-"))) |
17493 | 2989 (modes (ignore-errors |
2990 (file-modes (concat gnus-current-startup-file ".eld"))))) | |
38627
6520def531cc
(gnus-startup-file-coding-system): Revert to binary.
Gerd Moellmann <gerd@gnu.org>
parents:
38612
diff
changeset
|
2991 (let ((coding-system-for-write gnus-ding-file-coding-system)) |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
2992 (gnus-write-buffer slave-name)) |
17493 | 2993 (when modes |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
2994 (gnus-set-file-modes slave-name modes))))) |
17493 | 2995 |
2996 (defun gnus-master-read-slave-newsrc () | |
2997 (let ((slave-files | |
2998 (directory-files | |
2999 (file-name-directory gnus-current-startup-file) | |
3000 t (concat | |
3001 "^" (regexp-quote | |
3002 (concat | |
3003 (file-name-nondirectory gnus-current-startup-file) | |
3004 "-slave-"))) | |
3005 t)) | |
3006 file) | |
3007 (if (not slave-files) | |
3008 () ; There are no slave files to read. | |
3009 (gnus-message 7 "Reading slave newsrcs...") | |
110410
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
3010 (with-current-buffer (gnus-get-buffer-create " *gnus slave*") |
17493 | 3011 (setq slave-files |
3012 (sort (mapcar (lambda (file) | |
3013 (list (nth 5 (file-attributes file)) file)) | |
3014 slave-files) | |
3015 (lambda (f1 f2) | |
3016 (or (< (caar f1) (caar f2)) | |
3017 (< (nth 1 (car f1)) (nth 1 (car f2))))))) | |
3018 (while slave-files | |
3019 (erase-buffer) | |
3020 (setq file (nth 1 (car slave-files))) | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
3021 (nnheader-insert-file-contents file) |
17493 | 3022 (when (condition-case () |
3023 (progn | |
3024 (eval-buffer (current-buffer)) | |
3025 t) | |
3026 (error | |
3027 (gnus-error 3.2 "Possible error in %s" file) | |
3028 nil)) | |
3029 (unless gnus-slave ; Slaves shouldn't delete these files. | |
3030 (ignore-errors | |
3031 (delete-file file)))) | |
3032 (setq slave-files (cdr slave-files)))) | |
3033 (gnus-dribble-touch) | |
3034 (gnus-message 7 "Reading slave newsrcs...done")))) | |
3035 | |
3036 | |
3037 ;;; | |
3038 ;;; Group description. | |
3039 ;;; | |
3040 | |
3041 (defun gnus-read-all-descriptions-files () | |
3042 (let ((methods (cons gnus-select-method | |
3043 (nconc | |
3044 (when (gnus-archive-server-wanted-p) | |
3045 (list "archive")) | |
3046 gnus-secondary-select-methods)))) | |
3047 (while methods | |
3048 (gnus-read-descriptions-file (car methods)) | |
3049 (setq methods (cdr methods))) | |
3050 t)) | |
3051 | |
3052 (defun gnus-read-descriptions-file (&optional method) | |
3053 (let ((method (or method gnus-select-method)) | |
3054 group) | |
3055 (when (stringp method) | |
3056 (setq method (gnus-server-to-method method))) | |
3057 ;; We create the hashtable whether we manage to read the desc file | |
3058 ;; to avoid trying to re-read after a failed read. | |
3059 (unless gnus-description-hashtb | |
3060 (setq gnus-description-hashtb | |
3061 (gnus-make-hashtable (length gnus-active-hashtb)))) | |
3062 ;; Mark this method's desc file as read. | |
3063 (gnus-sethash (gnus-group-prefixed-name "" method) "Has read" | |
3064 gnus-description-hashtb) | |
3065 | |
3066 (gnus-message 5 "Reading descriptions file via %s..." (car method)) | |
3067 (cond | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
3068 ((null (gnus-get-function method 'request-list-newsgroups t)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
3069 t) |
17493 | 3070 ((not (gnus-check-server method)) |
3071 (gnus-message 1 "Couldn't open server") | |
3072 nil) | |
3073 ((not (gnus-request-list-newsgroups method)) | |
3074 (gnus-message 1 "Couldn't read newsgroups descriptions") | |
3075 nil) | |
3076 (t | |
3077 (save-excursion | |
108215
8264830363ca
Use define-minor-mode in Gnus where applicable.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
106815
diff
changeset
|
3078 ;; FIXME: Shouldn't save-restriction be done after set-buffer? |
17493 | 3079 (save-restriction |
3080 (set-buffer nntp-server-buffer) | |
3081 (goto-char (point-min)) | |
3082 (when (or (search-forward "\n.\n" nil t) | |
3083 (goto-char (point-max))) | |
3084 (beginning-of-line) | |
3085 (narrow-to-region (point-min) (point))) | |
3086 ;; If these are groups from a foreign select method, we insert the | |
3087 ;; group prefix in front of the group names. | |
3088 (and method (not (inline | |
3089 (gnus-server-equal | |
3090 (gnus-server-get-method nil method) | |
3091 (gnus-server-get-method | |
3092 nil gnus-select-method)))) | |
3093 (let ((prefix (gnus-group-prefixed-name "" method))) | |
3094 (goto-char (point-min)) | |
3095 (while (and (not (eobp)) | |
3096 (progn (insert prefix) | |
3097 (zerop (forward-line 1))))))) | |
3098 (goto-char (point-min)) | |
3099 (while (not (eobp)) | |
3100 ;; If we get an error, we set group to 0, which is not a | |
3101 ;; symbol... | |
3102 (setq group | |
3103 (condition-case () | |
3104 (let ((obarray gnus-description-hashtb)) | |
3105 ;; Group is set to a symbol interned in this | |
3106 ;; hash table. | |
3107 (read nntp-server-buffer)) | |
3108 (error 0))) | |
3109 (skip-chars-forward " \t") | |
3110 ;; ... which leads to this line being effectively ignored. | |
3111 (when (symbolp group) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3112 (let* ((str (buffer-substring |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3113 (point) (progn (end-of-line) (point)))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3114 (name (symbol-name group)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3115 (charset |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3116 (or (gnus-group-name-charset method name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3117 (gnus-parameter-charset name) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3118 gnus-default-charset))) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3119 ;; Fixme: Don't decode in unibyte mode. |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3120 (when (and str charset (featurep 'mule)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3121 (setq str (mm-decode-coding-string str charset))) |
20235
518f3a9e5812
(gnus-read-descriptions-file): Decode
Kenichi Handa <handa@m17n.org>
parents:
19969
diff
changeset
|
3122 (set group str))) |
17493 | 3123 (forward-line 1)))) |
3124 (gnus-message 5 "Reading descriptions file...done") | |
3125 t)))) | |
3126 | |
3127 (defun gnus-group-get-description (group) | |
3128 "Get the description of a group by sending XGTITLE to the server." | |
3129 (when (gnus-request-group-description group) | |
110410
f2e111723c3a
Merge changes made in Gnus trunk.
Katsumi Yamaoka <yamaoka@jpl.org>
parents:
110333
diff
changeset
|
3130 (with-current-buffer nntp-server-buffer |
17493 | 3131 (goto-char (point-min)) |
3132 (when (looking-at "[^ \t]+[ \t]+\\(.*\\)") | |
3133 (match-string 1))))) | |
3134 | |
3135 ;;;###autoload | |
3136 (defun gnus-declare-backend (name &rest abilities) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3137 "Declare back end NAME with ABILITIES as a Gnus back end." |
17493 | 3138 (setq gnus-valid-select-methods |
3139 (nconc gnus-valid-select-methods | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
3140 (list (apply 'list name abilities)))) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
26039
diff
changeset
|
3141 (gnus-redefine-select-method-widget)) |
17493 | 3142 |
3143 (defun gnus-set-default-directory () | |
3144 "Set the default directory in the current buffer to `gnus-default-directory'. | |
3145 If this variable is nil, don't do anything." | |
3146 (setq default-directory | |
3147 (if (and gnus-default-directory | |
3148 (file-exists-p gnus-default-directory)) | |
3149 (file-name-as-directory (expand-file-name gnus-default-directory)) | |
3150 default-directory))) | |
3151 | |
60824
58727a5c98c4
(gnus-display-time-event-handler):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
59996
diff
changeset
|
3152 (defun gnus-display-time-event-handler () |
58727a5c98c4
(gnus-display-time-event-handler):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
59996
diff
changeset
|
3153 (if (and (fboundp 'display-time-event-handler) |
58727a5c98c4
(gnus-display-time-event-handler):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
59996
diff
changeset
|
3154 (gnus-boundp 'display-time-timer)) |
58727a5c98c4
(gnus-display-time-event-handler):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
59996
diff
changeset
|
3155 (display-time-event-handler))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3156 |
85712
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3157 (defun gnus-check-reasonable-setup () |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3158 ;; Check whether nnml and nnfolder share a directory. |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3159 (let ((display-warn |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3160 (if (fboundp 'display-warning) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3161 'display-warning |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3162 (lambda (type message) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3163 (if noninteractive |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3164 (message "Warning (%s): %s" type message) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3165 (let (window) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3166 (with-current-buffer (get-buffer-create "*Warnings*") |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3167 (goto-char (point-max)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3168 (unless (bolp) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3169 (insert "\n")) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3170 (insert (format "Warning (%s): %s\n" type message)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3171 (setq window (display-buffer (current-buffer))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3172 (set-window-start |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3173 window |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3174 (prog2 |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3175 (forward-line (- 1 (window-height window))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3176 (point) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3177 (goto-char (point-max)))))))))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3178 method active actives match) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3179 (dolist (server gnus-server-alist) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3180 (setq method (gnus-server-to-method server) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3181 active (intern (format "%s-active-file" (car method)))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3182 (when (and (member (car method) '(nnml nnfolder)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3183 (gnus-server-opened method) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3184 (boundp active)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3185 (when (setq match (assoc (symbol-value active) actives)) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3186 (funcall display-warn 'gnus-server |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3187 (format "%s and %s share the same active file %s" |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3188 (car method) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3189 (cadr match) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3190 (car match)))) |
a3c27999decb
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Miles Bader <miles@gnu.org>
parents:
78224
diff
changeset
|
3191 (push (list (symbol-value active) method) actives))))) |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
3192 |
17493 | 3193 (provide 'gnus-start) |
3194 | |
3195 ;;; gnus-start.el ends here |