From: Glenn Morris <rgm@gnu.org>
Date: Mon, 3 Jan 2011 01:41:54 +0000 (-0800)
Subject: Small sieve.el fix for bug #7720.
X-Git-Tag: emacs-pretest-24.0.90~104^2~618^2~1322^2~278^2~31
X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=980f570a78ae67460930f06de5be34ea65520c8f;p=emacs.git

Small sieve.el fix for bug #7720.

* lisp/gnus/sieve.el (sieve-open-server): Give a more explicit error if
sieve-manage-open returns nil.
---

diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 00702e73596..75aebf79873 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,8 @@
+2011-01-03  Glenn Morris  <rgm@gnu.org>
+
+	* sieve.el (sieve-open-server): Give a more explicit error if
+	sieve-manage-open returns nil.  (Bug#7720)
+
 2011-01-02  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 	* nnimap.el (nnimap-login): Prefer AUTH=CRAM-MD5, if it's available.
diff --git a/lisp/gnus/sieve.el b/lisp/gnus/sieve.el
index ca181c2e7b3..f37a3b6ad7d 100644
--- a/lisp/gnus/sieve.el
+++ b/lisp/gnus/sieve.el
@@ -322,9 +322,10 @@ Server  : " server ":" (or port "2000") "
 (defun sieve-open-server (server &optional port)
   "Open SERVER (on PORT) and authenticate."
   (with-current-buffer
-      ;; open server
-      (set (make-local-variable 'sieve-manage-buffer)
-           (sieve-manage-open server))
+      (or ;; open server
+       (set (make-local-variable 'sieve-manage-buffer)
+	    (sieve-manage-open server))
+       (error "Error opening server %s" server))
     (sieve-manage-authenticate)))
 
 (defun sieve-refresh-scriptlist ()