diff options
author | Gnus developers <ding@gnus.org> | 2011-07-31 22:15:44 +0000 |
---|---|---|
committer | Katsumi Yamaoka <yamaoka@jpl.org> | 2011-07-31 22:15:44 +0000 |
commit | 93855df97b1f05c7edce377c8af9da444b3dcc66 (patch) | |
tree | c8168f77da05745fbdb613d59a728e6d1c7d5a8c | |
parent | e8500ff4af0d6c390f66a1f6d7d22695e590a8af (diff) |
Merge changes made in Gnus trunk.
nnmaildir.el (nnmaildir-request-accept-article): Don't call `unix-sync' unless it's defined.
gnus-art.el (gnus-article-stop-animations): Use `elt' instead of `aref' for XEmacs compatibiltiy.
spam.el (spam-fetch-field-fast): Rewrite slightly for clarity.
gnus-sum.el (gnus-summary-refer-thread): Since lambdas aren't closures, quote the form properly (bug#9194).
gnus-sum.el (gnus-summary-insert-new-articles): Clean up slightly.
(gnus-summary-insert-new-articles): Protect against servers that are down.
-rw-r--r-- | lisp/gnus/ChangeLog | 25 | ||||
-rw-r--r-- | lisp/gnus/gnus-art.el | 2 | ||||
-rw-r--r-- | lisp/gnus/gnus-sum.el | 44 | ||||
-rw-r--r-- | lisp/gnus/nnmaildir.el | 3 | ||||
-rw-r--r-- | lisp/gnus/spam.el | 50 |
5 files changed, 75 insertions, 49 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index acdd103393..b4b28005a8 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,28 @@ +2011-07-31 Lars Ingebrigtsen <larsi@gnus.org> + + * nnmaildir.el (nnmaildir-request-accept-article): Don't call + `unix-sync' unless it's defined. + +2011-07-31 Marcus Harnisch <marcus.harnisch@gmx.net> (tiny change) + + * gnus-art.el (gnus-article-stop-animations): Use `elt' instead of + `aref' for XEmacs compatibiltiy. + +2011-07-31 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * spam.el (spam-fetch-field-fast): Rewrite slightly for clarity. + +2011-07-31 Dave Abrahams <dave@boostpro.com> (tiny change) + + * gnus-sum.el (gnus-summary-refer-thread): Since lambdas aren't + closures, quote the form properly (bug#9194). + +2011-07-31 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * gnus-sum.el (gnus-summary-insert-new-articles): Clean up slightly. + (gnus-summary-insert-new-articles): Protect against servers that are + down. + 2011-07-29 Daniel Dehennin <daniel.dehennin@baby-gnu.org> * mm-decode.el (mm-dissect-buffer): Add a default content-disposition diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index c29000f469..28c6aca367 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -4541,7 +4541,7 @@ commands: (defun gnus-article-stop-animations () (dolist (timer (and (boundp 'timer-list) timer-list)) - (when (eq (aref timer 5) 'image-animate-timeout) + (when (eq (elt timer 5) 'image-animate-timeout) (cancel-timer timer)))) ;; Set article window start at LINE, where LINE is the number of lines diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 5917c9d7ce..a8cf5e7c42 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -9015,9 +9015,9 @@ non-numeric or nil fetch the number specified by the (refs (split-string (or (mail-header-references header) ""))) (gnus-parse-headers-hook - (lambda () (goto-char (point-min)) + `(lambda () (goto-char (point-min)) (keep-lines - (regexp-opt (append refs (list id subject))))))) + (regexp-opt ',(append refs (list id subject))))))) (gnus-fetch-headers (list last) (if (numberp limit) (* 2 limit) limit) t))))) (when (listp new-headers) @@ -12851,26 +12851,26 @@ If ALL is a number, fetch this number of articles." (defun gnus-summary-insert-new-articles () "Insert all new articles in this group." (interactive) - (prog1 - (let ((old (sort (mapcar 'car gnus-newsgroup-data) '<)) - (old-high gnus-newsgroup-highest) - (nnmail-fetched-sources (list t)) - i new) - (setq gnus-newsgroup-active - (gnus-copy-sequence - (gnus-activate-group gnus-newsgroup-name 'scan))) - (setq i (cdr gnus-newsgroup-active) - gnus-newsgroup-highest i) - (while (> i old-high) - (push i new) - (decf i)) - (if (not new) - (message "No gnus is bad news") - (gnus-summary-insert-articles new) - (setq gnus-newsgroup-unreads - (gnus-sorted-nunion gnus-newsgroup-unreads new)) - (gnus-summary-limit (gnus-sorted-nunion old new)))) - (gnus-summary-position-point))) + (let ((old (sort (mapcar 'car gnus-newsgroup-data) '<)) + (old-high gnus-newsgroup-highest) + (nnmail-fetched-sources (list t)) + (new-active (gnus-activate-group gnus-newsgroup-name 'scan)) + i new) + (unless new-active + (error "Couldn't fetch new data")) + (setq gnus-newsgroup-active (gnus-copy-sequence new-active)) + (setq i (cdr gnus-newsgroup-active) + gnus-newsgroup-highest i) + (while (> i old-high) + (push i new) + (decf i)) + (if (not new) + (message "No gnus is bad news") + (gnus-summary-insert-articles new) + (setq gnus-newsgroup-unreads + (gnus-sorted-nunion gnus-newsgroup-unreads new)) + (gnus-summary-limit (gnus-sorted-nunion old new)))) + (gnus-summary-position-point)) ;;; Bookmark support for Gnus. (declare-function bookmark-make-record-default diff --git a/lisp/gnus/nnmaildir.el b/lisp/gnus/nnmaildir.el index 8e2cd4bdde..bbace7c784 100644 --- a/lisp/gnus/nnmaildir.el +++ b/lisp/gnus/nnmaildir.el @@ -1381,7 +1381,8 @@ by nnmaildir-request-article.") (error (gmm-write-region (point-min) (point-max) tmpfile nil 'no-message nil 'excl) - (unix-sync))) ;; no fsync :( + (when (fboundp 'unix-sync) + (unix-sync)))) ;; no fsync :( (nnheader-cancel-timer 24h) (condition-case err (add-name-to-file tmpfile curfile) diff --git a/lisp/gnus/spam.el b/lisp/gnus/spam.el index 33dbaaa1f0..c7f993d729 100644 --- a/lisp/gnus/spam.el +++ b/lisp/gnus/spam.el @@ -1581,31 +1581,31 @@ to find it out)." (when (numberp article) (let* ((data-header (or prepared-data-header (spam-fetch-article-header article)))) - (if (arrayp data-header) - (cond - ((equal field 'number) - (mail-header-number data-header)) - ((equal field 'from) - (mail-header-from data-header)) - ((equal field 'message-id) - (mail-header-message-id data-header)) - ((equal field 'subject) - (mail-header-subject data-header)) - ((equal field 'references) - (mail-header-references data-header)) - ((equal field 'date) - (mail-header-date data-header)) - ((equal field 'xref) - (mail-header-xref data-header)) - ((equal field 'extra) - (mail-header-extra data-header)) - (t - (gnus-error - 5 - "spam-fetch-field-fast: unknown field %s requested" - field) - nil)) - (gnus-message 6 "Article %d has a nil data header" article))))) + (cond + ((not (arrayp data-header)) + (gnus-message 6 "Article %d has a nil data header" article)) + ((equal field 'number) + (mail-header-number data-header)) + ((equal field 'from) + (mail-header-from data-header)) + ((equal field 'message-id) + (mail-header-message-id data-header)) + ((equal field 'subject) + (mail-header-subject data-header)) + ((equal field 'references) + (mail-header-references data-header)) + ((equal field 'date) + (mail-header-date data-header)) + ((equal field 'xref) + (mail-header-xref data-header)) + ((equal field 'extra) + (mail-header-extra data-header)) + (t + (gnus-error + 5 + "spam-fetch-field-fast: unknown field %s requested" + field) + nil))))) (defun spam-fetch-field-from-fast (article &optional prepared-data-header) (spam-fetch-field-fast article 'from prepared-data-header)) |