emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/gnus/auth-source.el,v


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/gnus/auth-source.el,v
Date: Sat, 26 Apr 2008 04:29:44 +0000

CVSROOT:        /cvsroot/emacs
Module name:    emacs
Changes by:     Miles Bader <miles>     08/04/26 04:29:42

Index: auth-source.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/gnus/auth-source.el,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- auth-source.el      21 Apr 2008 07:13:26 -0000      1.3
+++ auth-source.el      26 Apr 2008 04:29:42 -0000      1.4
@@ -86,11 +86,6 @@
                 (list :tag "Source definition"
                       (const :format "" :value :source)
                       (string :tag "Authentication Source")
-                      (const :format "" :value :server)
-                      (choice :tag "Server (logical name) choice"
-                              (const :tag "Any" t)
-                              (regexp :tag "Server regular expression (TODO)")
-                              (const :tag "Fallback" nil))
                       (const :format "" :value :host)
                       (choice :tag "Host (machine) choice"
                               (const :tag "Any" t)
@@ -118,20 +113,16 @@
 ;; (auth-source-user-or-password-imap "password" "imap.myhost.com")
 ;; (auth-source-protocol-defaults 'imap)
 
-(defun auth-source-pick (server host protocol &optional fallback)
-  "Parse `auth-sources' for SERVER, HOST, and PROTOCOL matches.
+(defun auth-source-pick (host protocol &optional fallback)
+  "Parse `auth-sources' for HOST, and PROTOCOL matches.
 
-Returns fallback choices (where SERVER. PROTOCOL or HOST are nil) with 
FALLBACK t."
+Returns fallback choices (where PROTOCOL or HOST are nil) with FALLBACK t."
   (interactive "sHost: \nsProtocol: \n") ;for testing
   (let (choices)
     (dolist (choice auth-sources)
-      (let ((s (plist-get choice :server))
-           (h (plist-get choice :host))
+      (let ((h (plist-get choice :host))
            (p (plist-get choice :protocol)))
        (when (and
-              (or (equal t s)
-                  (and (stringp s) (string-match s server))
-                  (and fallback (equal s nil)))
               (or (equal t h)
                   (and (stringp h) (string-match h host))
                   (and fallback (equal h nil)))
@@ -142,12 +133,12 @@
     (if choices
        choices
       (unless fallback
-       (auth-source-pick server host protocol t)))))
+       (auth-source-pick host protocol t)))))
 
-(defun auth-source-user-or-password (mode server host protocol)
-  "Find user or password (from the string MODE) matching SERVER, HOST, and 
PROTOCOL."
+(defun auth-source-user-or-password (mode host protocol)
+  "Find user or password (from the string MODE) matching HOST and PROTOCOL."
   (let (found)
-    (dolist (choice (auth-source-pick server host protocol))
+    (dolist (choice (auth-source-pick host protocol))
       (setq found (netrc-machine-user-or-password 
                   mode
                   (plist-get choice :source)
@@ -161,20 +152,20 @@
   "Return a list of default ports and names for PROTOCOL."
   (cdr-safe (assoc protocol auth-source-protocols)))
 
-(defun auth-source-user-or-password-imap (mode server host)
-  (auth-source-user-or-password mode server host 'imap))
+(defun auth-source-user-or-password-imap (mode host)
+  (auth-source-user-or-password mode host 'imap))
 
-(defun auth-source-user-or-password-pop3 (mode server host)
-  (auth-source-user-or-password mode server host 'pop3))
+(defun auth-source-user-or-password-pop3 (mode host)
+  (auth-source-user-or-password mode host 'pop3))
 
-(defun auth-source-user-or-password-ssh (mode server host)
-  (auth-source-user-or-password mode server host 'ssh))
+(defun auth-source-user-or-password-ssh (mode host)
+  (auth-source-user-or-password mode host 'ssh))
 
-(defun auth-source-user-or-password-sftp (mode server host)
-  (auth-source-user-or-password mode server host 'sftp))
+(defun auth-source-user-or-password-sftp (mode host)
+  (auth-source-user-or-password mode host 'sftp))
 
-(defun auth-source-user-or-password-smtp (mode server host)
-  (auth-source-user-or-password mode server host 'smtp))
+(defun auth-source-user-or-password-smtp (mode host)
+  (auth-source-user-or-password mode host 'smtp))
 
 (provide 'auth-source)
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]