diff options
| author | Lars Magne Ingebrigtsen | 2010-09-05 00:44:53 +0000 |
|---|---|---|
| committer | Katsumi Yamaoka | 2010-09-05 00:44:53 +0000 |
| commit | 4469385cdc5c7c22439209b3015a7396e6fcc881 (patch) | |
| tree | cb5f55f41c656c4f3b112ebb6b7afea0cc3488e9 | |
| parent | 2c8bcd54bd7d153bd6afd3c9dfa55c0b934c508d (diff) | |
| download | emacs-4469385cdc5c7c22439209b3015a7396e6fcc881.tar.gz emacs-4469385cdc5c7c22439209b3015a7396e6fcc881.zip | |
gnus-agent.el (gnus-agent-load-local): Only read the agent.lib/local file once per `g' run.
| -rw-r--r-- | lisp/gnus/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/gnus/gnus-agent.el | 17 | ||||
| -rw-r--r-- | lisp/gnus/gnus-start.el | 1 | ||||
| -rw-r--r-- | lisp/gnus/nnmh.el | 2 |
4 files changed, 16 insertions, 7 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 76ca82eb710..b73216ae702 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2010-09-04 Lars Magne Ingebrigtsen <larsi@gnus.org> | 1 | 2010-09-04 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 2 | ||
| 3 | * gnus-agent.el (gnus-agent-load-local): Only read the agent.lib/local | ||
| 4 | file once per `g' run. | ||
| 5 | |||
| 3 | * nnmh.el (nnmh-request-list-1): Output active lines also for empty | 6 | * nnmh.el (nnmh-request-list-1): Output active lines also for empty |
| 4 | directories. This makes the draft queue directory work. | 7 | directories. This makes the draft queue directory work. |
| 5 | 8 | ||
diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el index c5232819379..bbfdc66af99 100644 --- a/lisp/gnus/gnus-agent.el +++ b/lisp/gnus/gnus-agent.el | |||
| @@ -2232,23 +2232,28 @@ doesn't exist, to valid the overview buffer." | |||
| 2232 | (gnus-agent-update-view-total-fetched-for group nil))) | 2232 | (gnus-agent-update-view-total-fetched-for group nil))) |
| 2233 | 2233 | ||
| 2234 | (defvar gnus-agent-article-local nil) | 2234 | (defvar gnus-agent-article-local nil) |
| 2235 | (defvar gnus-agent-article-local-times nil) | ||
| 2235 | (defvar gnus-agent-file-loading-local nil) | 2236 | (defvar gnus-agent-file-loading-local nil) |
| 2236 | 2237 | ||
| 2237 | (defun gnus-agent-load-local (&optional method) | 2238 | (defun gnus-agent-load-local (&optional method) |
| 2238 | "Load the METHOD'S local file. The local file contains min/max | 2239 | "Load the METHOD'S local file. The local file contains min/max |
| 2239 | article counts for each of the method's subscribed groups." | 2240 | article counts for each of the method's subscribed groups." |
| 2240 | (let ((gnus-command-method (or method gnus-command-method))) | 2241 | (let ((gnus-command-method (or method gnus-command-method))) |
| 2241 | (setq gnus-agent-article-local | 2242 | (when (or (null gnus-agent-article-local-times) |
| 2242 | (gnus-cache-file-contents | 2243 | (zerop gnus-agent-article-local-times)) |
| 2243 | (gnus-agent-lib-file "local") | 2244 | (setq gnus-agent-article-local |
| 2244 | 'gnus-agent-file-loading-local | 2245 | (gnus-cache-file-contents |
| 2245 | 'gnus-agent-read-and-cache-local)))) | 2246 | (gnus-agent-lib-file "local") |
| 2247 | 'gnus-agent-file-loading-local | ||
| 2248 | 'gnus-agent-read-and-cache-local)) | ||
| 2249 | (when gnus-agent-article-local-times | ||
| 2250 | (incf gnus-agent-article-local-times))) | ||
| 2251 | gnus-agent-article-local)) | ||
| 2246 | 2252 | ||
| 2247 | (defun gnus-agent-read-and-cache-local (file) | 2253 | (defun gnus-agent-read-and-cache-local (file) |
| 2248 | "Load and read FILE then bind its contents to | 2254 | "Load and read FILE then bind its contents to |
| 2249 | gnus-agent-article-local. If that variable had `dirty' (also known as | 2255 | gnus-agent-article-local. If that variable had `dirty' (also known as |
| 2250 | modified) original contents, they are first saved to their own file." | 2256 | modified) original contents, they are first saved to their own file." |
| 2251 | |||
| 2252 | (if (and gnus-agent-article-local | 2257 | (if (and gnus-agent-article-local |
| 2253 | (symbol-value (intern "+dirty" gnus-agent-article-local))) | 2258 | (symbol-value (intern "+dirty" gnus-agent-article-local))) |
| 2254 | (gnus-agent-save-local)) | 2259 | (gnus-agent-save-local)) |
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 16a733d1452..b111f5caa19 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el | |||
| @@ -1684,6 +1684,7 @@ If SCAN, request a scan of that group as well." | |||
| 1684 | alevel)) | 1684 | alevel)) |
| 1685 | (methods-cache nil) | 1685 | (methods-cache nil) |
| 1686 | (type-cache nil) | 1686 | (type-cache nil) |
| 1687 | (gnus-agent-article-local-times 0) | ||
| 1687 | infos info group active method cmethod | 1688 | infos info group active method cmethod |
| 1688 | method-type method-group-list) | 1689 | method-type method-group-list) |
| 1689 | (gnus-message 6 "Checking new news...") | 1690 | (gnus-message 6 "Checking new news...") |
diff --git a/lisp/gnus/nnmh.el b/lisp/gnus/nnmh.el index ba9eb232f3b..17311b9688c 100644 --- a/lisp/gnus/nnmh.el +++ b/lisp/gnus/nnmh.el | |||
| @@ -248,7 +248,7 @@ as unread by Gnus.") | |||
| 248 | ?/ ?.) | 248 | ?/ ?.) |
| 249 | nnmail-pathname-coding-system))) | 249 | nnmail-pathname-coding-system))) |
| 250 | (or max 0) | 250 | (or max 0) |
| 251 | (or min 0)))))) | 251 | (or min 1)))))) |
| 252 | t) | 252 | t) |
| 253 | 253 | ||
| 254 | (deffoo nnmh-request-newgroups (date &optional server) | 254 | (deffoo nnmh-request-newgroups (date &optional server) |