Changes committed gnus/lisp (ChangeLog mail-source.el)

"Ted Zlatanov" <[email protected]>
Newsgroups gmane.emacs.gnus.commits
Message-ID <[email protected]>
Modified: ChangeLog mail-source.el

(mail-source-bind): Don't use user or password if they
are not bound.  Unintern them if they are nil.


Index: ChangeLog
diff -u gnus/lisp/ChangeLog:7.1837 gnus/lisp/ChangeLog:7.1838
--- ChangeLog:7.1837	Sat Apr 26 06:31:17 2008
+++ ChangeLog	Sat Apr 26 14:47:15 2008
@@ -1,3 +1,8 @@
+2008-04-26  Teodor Zlatanov  <[email protected]>
+
+	* mail-source.el (mail-source-bind): Don't use user or password if they
+	are not bound.  Unintern them if they are nil.
+
 2008-04-25  Teodor Zlatanov  <[email protected]>
 
 	* mail-source.el: Load auth-source.el.
Index: mail-source.el
diff -u gnus/lisp/mail-source.el:7.33 gnus/lisp/mail-source.el:7.34
--- mail-source.el:7.33	Fri Apr 25 20:42:18 2008
+++ mail-source.el	Sat Apr 26 14:47:15 2008
@@ -451,18 +451,24 @@
 the `mail-source-keyword-map' variable."
   `(let* ,(mail-source-bind-1 (car type-source))
      (mail-source-set-1 ,(cadr type-source))
-     (let ((user (or
-		  (auth-source-user-or-password 
-		   "login"
-		   server	      ; this is "host" in auth-sources
-		   ',(car type-source))
-		  user))
-	   (password (or
-		      (auth-source-user-or-password 
-		       "password"
-		       server	      ; this is "host" in auth-sources
-		       ',(car type-source))
-		      password)))
+     (let ((user 
+	    (or
+	     (auth-source-user-or-password
+	      "login"
+	      server	      ; this is "host" in auth-sources
+	      ',(car type-source))
+	     (when (boundp 'user) (symbol-value 'user))))
+	   (password 
+	    (or
+	     (auth-source-user-or-password 
+	      "password"
+	      server	      ; this is "host" in auth-sources
+	      ',(car type-source))
+	     (when (boundp 'user) (symbol-value 'user)))))
+       (unless user
+	 (unintern 'user))
+       (unless password
+	 (unintern 'password))
        ,@body)))
 
 (put 'mail-source-bind 'lisp-indent-function 1)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.