aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2011-01-11 23:32:50 +0000
committerKatsumi Yamaoka2011-01-11 23:32:50 +0000
commitc516cd6dc7cec75a4a979f85c090f7f279eef3eb (patch)
tree3a6afccf3072f9f0c2c577d395e9c64df446f53a
parentf853f59905cce4c7b2dc442ff5da1a10769730b0 (diff)
downloademacs-c516cd6dc7cec75a4a979f85c090f7f279eef3eb.tar.gz
emacs-c516cd6dc7cec75a4a979f85c090f7f279eef3eb.zip
proto-stream.el (open-protocol-stream): Protect against the low-level transport functions returning nil.
gnus-sum.el (gnus-summary-next-article): Remove hack to reselect group window, because it does the wrong thing when a separate frame displays the group buffer. gnus-int.el (gnus-request-accept-article): Don't try to update marks and stuff if the backend didn't return the article number. This fixes an Exchange-related nnimap bug. mm-decode.el (mm-preferred-alternative-precedence): Discourage showing empty parts. nnimap.el (nnimap-convert-partial-article): Protect against zero-length body parts.
-rw-r--r--lisp/gnus/ChangeLog19
-rw-r--r--lisp/gnus/gnus-int.el6
-rw-r--r--lisp/gnus/gnus-sum.el3
-rw-r--r--lisp/gnus/mm-decode.el21
-rw-r--r--lisp/gnus/nnimap.el2
-rw-r--r--lisp/gnus/proto-stream.el21
6 files changed, 49 insertions, 23 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index abbddcc49cc..c0c6533d531 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,22 @@
12011-01-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * nnimap.el (nnimap-convert-partial-article): Protect against
4 zero-length body parts.
5
6 * mm-decode.el (mm-preferred-alternative-precedence): Discourage
7 showing empty parts.
8
9 * gnus-int.el (gnus-request-accept-article): Don't try to update marks
10 and stuff if the backend didn't return the article number. This fixes
11 an Exchange-related nnimap bug.
12
13 * gnus-sum.el (gnus-summary-next-article): Remove hack to reselect
14 group window, because it does the wrong thing when a separate frame
15 displays the group buffer.
16
17 * proto-stream.el (open-protocol-stream): Protect against the low-level
18 transport functions returning nil.
19
12011-01-07 Daiki Ueno <ueno@unixuser.org> 202011-01-07 Daiki Ueno <ueno@unixuser.org>
2 21
3 * mml2015.el (epg-sub-key-fingerprint): Autoload. 22 * mml2015.el (epg-sub-key-fingerprint): Autoload.
diff --git a/lisp/gnus/gnus-int.el b/lisp/gnus/gnus-int.el
index 71a9aa9e618..b805167149f 100644
--- a/lisp/gnus/gnus-int.el
+++ b/lisp/gnus/gnus-int.el
@@ -1,7 +1,7 @@
1;;; gnus-int.el --- backend interface functions for Gnus 1;;; gnus-int.el --- backend interface functions for Gnus
2 2
3;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 3;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
4;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. 4;; 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
5 5
6;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> 6;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
7;; Keywords: news 7;; Keywords: news
@@ -711,7 +711,9 @@ If GROUP is nil, all groups on GNUS-COMMAND-METHOD are scanned."
711 (if (stringp group) (gnus-group-real-name group) group) 711 (if (stringp group) (gnus-group-real-name group) group)
712 (cadr gnus-command-method) 712 (cadr gnus-command-method)
713 last))) 713 last)))
714 (when (and gnus-agent (gnus-agent-method-p gnus-command-method)) 714 (when (and gnus-agent
715 (gnus-agent-method-p gnus-command-method)
716 (cdr result))
715 (gnus-agent-regenerate-group group (list (cdr result)))) 717 (gnus-agent-regenerate-group group (list (cdr result))))
716 result)) 718 result))
717 719
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 9a21a9c7f68..20a1141cc25 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -7687,9 +7687,6 @@ If BACKWARD, the previous article is selected instead of the next."
7687 (if (eq gnus-keep-same-level 'best) 7687 (if (eq gnus-keep-same-level 'best)
7688 (gnus-summary-best-group gnus-newsgroup-name) 7688 (gnus-summary-best-group gnus-newsgroup-name)
7689 (gnus-summary-search-group backward gnus-keep-same-level)))) 7689 (gnus-summary-search-group backward gnus-keep-same-level))))
7690 ;; For some reason, the group window gets selected. We change
7691 ;; it back.
7692 (select-window (get-buffer-window (current-buffer)))
7693 ;; Select next unread newsgroup automagically. 7690 ;; Select next unread newsgroup automagically.
7694 (cond 7691 (cond
7695 ((or (not gnus-auto-select-next) 7692 ((or (not gnus-auto-select-next)
diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el
index 216ed6624d9..62755347142 100644
--- a/lisp/gnus/mm-decode.el
+++ b/lisp/gnus/mm-decode.el
@@ -1,7 +1,7 @@
1;;; mm-decode.el --- Functions for decoding MIME things 1;;; mm-decode.el --- Functions for decoding MIME things
2 2
3;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 3;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
4;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. 4;; 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
5 5
6;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> 6;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
7;; MORIOKA Tomohiko <morioka@jaist.ac.jp> 7;; MORIOKA Tomohiko <morioka@jaist.ac.jp>
@@ -1367,13 +1367,18 @@ Use CMD as the process."
1367 1367
1368(defun mm-preferred-alternative-precedence (handles) 1368(defun mm-preferred-alternative-precedence (handles)
1369 "Return the precedence based on HANDLES and `mm-discouraged-alternatives'." 1369 "Return the precedence based on HANDLES and `mm-discouraged-alternatives'."
1370 (let ((seq (nreverse (mapcar #'mm-handle-media-type 1370 (setq handles (reverse handles))
1371 handles)))) 1371 (dolist (disc (reverse mm-discouraged-alternatives))
1372 (dolist (disc (reverse mm-discouraged-alternatives)) 1372 (dolist (handle (copy-sequence handles))
1373 (dolist (elem (copy-sequence seq)) 1373 (when (string-match disc (mm-handle-media-type handle))
1374 (when (string-match disc elem) 1374 (setq handles (nconc (delete handle handles) (list handle))))))
1375 (setq seq (nconc (delete elem seq) (list elem)))))) 1375 ;; Remove empty parts.
1376 seq)) 1376 (dolist (handle (copy-sequence handles))
1377 (unless (with-current-buffer (mm-handle-buffer handle)
1378 (goto-char (point-min))
1379 (re-search-forward "[^ \t\n]" nil t))
1380 (setq handles (nconc (delete handle handles) (list handle)))))
1381 (mapcar #'mm-handle-media-type handles))
1377 1382
1378(defun mm-get-content-id (id) 1383(defun mm-get-content-id (id)
1379 "Return the handle(s) referred to by ID." 1384 "Return the handle(s) referred to by ID."
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index 51fa532a371..0c711701e96 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -582,7 +582,7 @@ textual parts.")
582 ;; Collect all the body parts. 582 ;; Collect all the body parts.
583 (while (looking-at ".*BODY\\[\\([.0-9]+\\)\\]") 583 (while (looking-at ".*BODY\\[\\([.0-9]+\\)\\]")
584 (setq id (match-string 1) 584 (setq id (match-string 1)
585 bytes (nnimap-get-length)) 585 bytes (or (nnimap-get-length) 0))
586 (beginning-of-line) 586 (beginning-of-line)
587 (delete-region (point) (progn (forward-line 1) (point))) 587 (delete-region (point) (progn (forward-line 1) (point)))
588 (push (list id (buffer-substring (point) (+ (point) bytes))) 588 (push (list id (buffer-substring (point) (+ (point) bytes)))
diff --git a/lisp/gnus/proto-stream.el b/lisp/gnus/proto-stream.el
index d1266cb5461..546461a67b3 100644
--- a/lisp/gnus/proto-stream.el
+++ b/lisp/gnus/proto-stream.el
@@ -1,6 +1,6 @@
1;;; proto-stream.el --- negotiating TLS, STARTTLS and other connections 1;;; proto-stream.el --- negotiating TLS, STARTTLS and other connections
2 2
3;; Copyright (C) 2010 Free Software Foundation, Inc. 3;; Copyright (C) 2010, 2011 Free Software Foundation, Inc.
4 4
5;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> 5;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
6;; Keywords: network 6;; Keywords: network
@@ -101,14 +101,17 @@ command to switch on STARTTLS otherwise."
101 (setq type 'network)) 101 (setq type 'network))
102 ((eq type 'ssl) 102 ((eq type 'ssl)
103 (setq type 'tls))) 103 (setq type 'tls)))
104 (destructuring-bind (stream greeting capabilities) 104 (let ((open-result
105 (funcall (intern (format "proto-stream-open-%s" type) obarray) 105 (funcall (intern (format "proto-stream-open-%s" type) obarray)
106 name buffer host service parameters) 106 name buffer host service parameters)))
107 (list (and stream 107 (if (null open-result)
108 (memq (process-status stream) 108 (list nil nil nil)
109 '(open run)) 109 (destructuring-bind (stream greeting capabilities) open-result
110 stream) 110 (list (and stream
111 greeting capabilities)))) 111 (memq (process-status stream)
112 '(open run))
113 stream)
114 greeting capabilities))))))
112 115
113(defun proto-stream-open-network-only (name buffer host service parameters) 116(defun proto-stream-open-network-only (name buffer host service parameters)
114 (let ((start (with-current-buffer buffer (point))) 117 (let ((start (with-current-buffer buffer (point)))