diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2011-08-02 22:05:38 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2011-08-02 22:05:38 -0700 |
commit | 9a70f03d70e44db2ec9c6d2952cb8a1deae15000 (patch) | |
tree | c0efd5c0a208640c0a883f4566df1b40caa3aaad /lisp/gnus | |
parent | 29c8a348c5c9f326af54a3d30f69cde98fe300bb (diff) |
Merge from trunk.
Diffstat (limited to 'lisp/gnus')
-rw-r--r-- | lisp/gnus/ChangeLog | 47 | ||||
-rw-r--r-- | lisp/gnus/gnus-art.el | 2 | ||||
-rw-r--r-- | lisp/gnus/gnus-sum.el | 44 | ||||
-rw-r--r-- | lisp/gnus/mm-decode.el | 8 | ||||
-rw-r--r-- | lisp/gnus/nnimap.el | 10 | ||||
-rw-r--r-- | lisp/gnus/nnir.el | 20 | ||||
-rw-r--r-- | lisp/gnus/nnmaildir.el | 3 | ||||
-rw-r--r-- | lisp/gnus/spam.el | 50 | ||||
-rw-r--r-- | lisp/gnus/starttls.el | 17 |
9 files changed, 128 insertions, 73 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index f90e180b12..e88b5154c7 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,50 @@ +2011-08-02 Andrew Cohen <cohen@andy.bu.edu> + + * nnir.el (nnir-search-thread): Position point on referring article + line. + (nnir-warp-to-article): Clean up summary buffers. + + * nnimap.el (nnimap-request-thread): Whitespace fix. + +2011-08-02 Steve Purcell <steve@sanityinc.com> (tiny change) + + * nnimap.el (nnimap-get-groups): Decode "&" correctly. + +2011-08-02 Lars Magne Ingebrigtsen <larsi@gnus.org> + + * starttls.el (starttls-available-p): Renamed from + `starttls-any-program-available' and changed return convention. + +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 + in mm handle if none is specified. + 2011-07-24 Andrew Cohen <cohen@andy.bu.edu> * nnimap.el (nnimap-make-thread-query): Quote message-ids for gmail. 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/mm-decode.el b/lisp/gnus/mm-decode.el index a51c6630ac..692175d471 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -564,7 +564,13 @@ Postpone undisplaying of viewers for types in (setq ct (mail-fetch-field "content-type") ctl (and ct (mail-header-parse-content-type ct)) cte (mail-fetch-field "content-transfer-encoding") - cd (mail-fetch-field "content-disposition") + cd (or (mail-fetch-field "content-disposition") + (when (and ctl + (eq 'mm-inline-text + (cadr (mm-assoc-string-match + mm-inline-media-tests + (car ctl))))) + "inline")) ;; Newlines in description should be stripped so as ;; not to break the MIME tag into two or more lines. description (message-fetch-field "content-description") diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 52de48869d..f41f4af71b 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -1107,9 +1107,9 @@ textual parts.") (separator (read (current-buffer))) (group (read (current-buffer)))) (unless (member '%NoSelect flags) - (push (if (stringp group) - group - (format "%s" group)) + (push (utf7-decode (if (stringp group) + group + (format "%s" group)) t) groups)))) (nreverse groups))) @@ -1168,7 +1168,7 @@ textual parts.") (nnimap-get-groups))) (unless (assoc group nnimap-current-infos) ;; Insert dummy numbers here -- they don't matter. - (insert (format "%S 0 1 y\n" group)))) + (insert (format "%S 0 1 y\n" (utf7-encode group))))) t))) (deffoo nnimap-retrieve-group-data-early (server infos) @@ -1566,7 +1566,7 @@ textual parts.") (articles &optional limit force-new dependencies)) (deffoo nnimap-request-thread (header &optional group server) - (if gnus-refer-thread-use-nnir + (if gnus-refer-thread-use-nnir (nnir-search-thread header) (when (nnimap-possibly-change-group group server) (let* ((cmd (nnimap-make-thread-query header)) diff --git a/lisp/gnus/nnir.el b/lisp/gnus/nnir.el index e6420a4d7b..d35e6560e7 100644 --- a/lisp/gnus/nnir.el +++ b/lisp/gnus/nnir.el @@ -767,11 +767,18 @@ Add an entry here when adding a new search engine.") (deffoo nnir-warp-to-article () (let* ((cur (if (> (gnus-summary-article-number) 0) (gnus-summary-article-number) - (error "This is not a real article."))) - (gnus-newsgroup-name (nnir-article-group cur)) - (backend-number (nnir-article-number cur))) - (gnus-summary-read-group-1 gnus-newsgroup-name t t gnus-summary-buffer - nil (list backend-number)))) + (error "This is not a real article"))) + (backend-article-group (nnir-article-group cur)) + (backend-article-number (nnir-article-number cur)) + (quit-config (gnus-ephemeral-group-p gnus-newsgroup-name))) + ;; first exit from the nnir summary buffer. + (gnus-summary-exit) + ;; and if the nnir summary buffer in turn came from another + ;; summary buffer we have to clean that summary up too. + (when (eq (cdr quit-config) 'summary) + (gnus-summary-exit)) + (gnus-summary-read-group-1 backend-article-group t t nil + nil (list backend-article-number)))) (nnoo-define-skeleton nnir) @@ -1659,7 +1666,8 @@ server is of form 'backend:name'." (cons 'server (gnus-method-to-server (gnus-find-method-for-group gnus-newsgroup-name)))))) - (gnus-group-make-nnir-group nil parm))) + (gnus-group-make-nnir-group nil parm) + (gnus-summary-goto-subject (gnus-id-to-article (mail-header-id header))))) ;; unused? (defun nnir-artlist-groups (artlist) 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)) diff --git a/lisp/gnus/starttls.el b/lisp/gnus/starttls.el index 4b4839a4df..c1caca90cf 100644 --- a/lisp/gnus/starttls.el +++ b/lisp/gnus/starttls.el @@ -295,18 +295,11 @@ GNUTLS requires a port number." (starttls-set-process-query-on-exit-flag process nil) process))) -(defun starttls-any-program-available () - (let ((program (if starttls-use-gnutls - starttls-gnutls-program - starttls-program))) - (condition-case () - (progn - (call-process program) - program) - (error (progn - (message "No STARTTLS program was available (tried '%s')" - program) - nil))))) +(defun starttls-available-p () + "Say whether the STARTTLS programs are available." + (executable-find (if starttls-use-gnutls + starttls-gnutls-program + starttls-program))) (provide 'starttls) |