[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r101487: * lisp/gnus/nnml.el (nnml-fi
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r101487: * lisp/gnus/nnml.el (nnml-files): Add prefix to dynamic var `files'. |
Date: |
Sun, 19 Sep 2010 11:16:28 +0200 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 101487
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Sun 2010-09-19 11:16:28 +0200
message:
* lisp/gnus/nnml.el (nnml-files): Add prefix to dynamic var `files'.
(nnml-generate-nov-databases-directory, nnml-generate-active-info):
Update var name.
(nnml-generate-nov-file): Use dolist.
(nnml-directory-articles, nnml-current-group-article-to-file-alist):
Use with-current-buffer.
modified:
lisp/gnus/ChangeLog
lisp/gnus/nnml.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog 2010-09-18 23:36:29 +0000
+++ b/lisp/gnus/ChangeLog 2010-09-19 09:16:28 +0000
@@ -1,3 +1,12 @@
+2010-09-19 Stefan Monnier <address@hidden>
+
+ * nnml.el (nnml-files): Add prefix to dynamic var `files'.
+ (nnml-generate-nov-databases-directory, nnml-generate-active-info):
+ Update var name.
+ (nnml-generate-nov-file): Use dolist.
+ (nnml-directory-articles, nnml-current-group-article-to-file-alist):
+ Use with-current-buffer.
+
2010-09-18 Julien Danjou <address@hidden>
* gnus-html.el (gnus-html-schedule-image-fetching): Fetch all images in
@@ -9,7 +18,7 @@
the range update right.
(nnimap-request-group): Don't make `M-g' bug out on group with no
marks.
- (nnoo): Required, so that other packages can require nnimap.
+ (nnoo): Require, so that other packages can require nnimap.
(nnimap-wait-for-response): Be a bit more lax in finding the end of the
command we're looking for. This helps when the server sends more
responses after we've gotten everything we expected.
=== modified file 'lisp/gnus/nnml.el'
--- a/lisp/gnus/nnml.el 2010-09-18 23:36:29 +0000
+++ b/lisp/gnus/nnml.el 2010-09-19 09:16:28 +0000
@@ -878,6 +878,7 @@
;; Save the active file.
(nnmail-save-active nnml-group-alist nnml-active-file))
+(defvar nnml-files)
(defun nnml-generate-nov-databases-directory (dir &optional seen no-active)
"Regenerate the NOV database in DIR.
@@ -897,9 +898,9 @@
(file-directory-p dir))
(nnml-generate-nov-databases-directory dir seen)))
;; Do this directory.
- (let ((files (sort (nnheader-article-to-file-alist dir)
+ (let ((nnml-files (sort (nnheader-article-to-file-alist dir)
'car-less-than-car)))
- (if (not files)
+ (if (not nnml-files)
(let* ((group (nnheader-file-to-group
(directory-file-name dir) nnml-directory))
(info (cadr (assoc group nnml-group-alist))))
@@ -907,11 +908,10 @@
(setcar info (1+ (cdr info)))))
(funcall nnml-generate-active-function dir)
;; Generate the nov file.
- (nnml-generate-nov-file dir files)
+ (nnml-generate-nov-file dir nnml-files)
(unless no-active
(nnmail-save-active nnml-group-alist nnml-active-file)))))))
-(defvar files)
(defun nnml-generate-active-info (dir)
;; Update the active info for this group.
(let ((group (directory-file-name dir))
@@ -922,9 +922,9 @@
last (or (caadr entry) 0)
nnml-group-alist (delq entry nnml-group-alist))
(push (list group
- (cons (or (caar files) (1+ last))
+ (cons (or (caar nnml-files) (1+ last))
(max last
- (or (caar (last files))
+ (or (caar (last nnml-files))
0))))
nnml-group-alist)))
@@ -941,8 +941,8 @@
;; Delete the old NOV file.
(when (file-exists-p nov)
(funcall nnmail-delete-file-function nov))
- (while files
- (unless (file-directory-p (setq file (concat dir (cdar files))))
+ (dolist (file files)
+ (unless (file-directory-p (setq file (concat dir (cdr file))))
(erase-buffer)
(nnheader-insert-file-contents file)
(narrow-to-region
@@ -953,12 +953,11 @@
(max (point-min) (1- (point)))))
(unless (zerop (buffer-size))
(goto-char (point-min))
- (setq headers (nnml-parse-head chars (caar files)))
+ (setq headers (nnml-parse-head chars (car file)))
(with-current-buffer nov-buffer
(goto-char (point-max))
(nnheader-insert-nov headers)))
- (widen))
- (setq files (cdr files)))
+ (widen)))
(with-current-buffer nov-buffer
(nnmail-write-region (point-min) (point-max) nov nil 'nomesg)
(kill-buffer (current-buffer))))))
@@ -995,11 +994,9 @@
;; build list from .overview if available
;; We would use nnml-open-nov, except that nnml-nov-buffer-alist is
;; defvoo'd, and we might get called when it hasn't been swapped in.
- (save-excursion
+ (with-current-buffer (nnml-get-nov-buffer nnml-current-group)
(let ((list nil)
- art
- (buffer (nnml-get-nov-buffer nnml-current-group)))
- (set-buffer buffer)
+ art)
(goto-char (point-min))
(while (not (eobp))
(setq art (read (current-buffer)))
@@ -1018,11 +1015,9 @@
nnml-current-directory))))
(nnheader-article-to-file-alist nnml-current-directory)
;; build list from .overview if available
- (save-excursion
+ (with-current-buffer (nnml-get-nov-buffer nnml-current-group)
(let ((alist nil)
- (buffer (nnml-get-nov-buffer nnml-current-group))
art)
- (set-buffer buffer)
(goto-char (point-min))
(while (not (eobp))
(setq art (read (current-buffer)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r101487: * lisp/gnus/nnml.el (nnml-files): Add prefix to dynamic var `files'.,
Stefan Monnier <=