comparison lisp/gnus/auth-source.el @ 107433:02eb32da1fbb

* auth-source.el (netrc-machine-user-or-password): Autoload.
author Michael Albinus <michael.albinus@gmx.de>
date Fri, 19 Mar 2010 11:29:02 +0100
parents 1d1d5d9bd884
children 0fe940324254
comparison
equal deleted inserted replaced
107432:340849d761a5 107433:02eb32da1fbb
32 ;;; Code: 32 ;;; Code:
33 33
34 (require 'gnus-util) 34 (require 'gnus-util)
35 35
36 (eval-when-compile (require 'cl)) 36 (eval-when-compile (require 'cl))
37 (eval-when-compile (require 'netrc)) 37 (autoload 'netrc-machine-user-or-password "netrc")
38 38
39 (defgroup auth-source nil 39 (defgroup auth-source nil
40 "Authentication sources." 40 "Authentication sources."
41 :version "23.1" ;; No Gnus 41 :version "23.1" ;; No Gnus
42 :group 'gnus) 42 :group 'gnus)
84 clear (except for passwords, which are always stripped out). 84 clear (except for passwords, which are always stripped out).
85 If the value is a function, debug messages are logged by calling 85 If the value is a function, debug messages are logged by calling
86 that function using the same arguments as `message'." 86 that function using the same arguments as `message'."
87 :group 'auth-source 87 :group 'auth-source
88 :version "23.1" ;; No Gnus 88 :version "23.1" ;; No Gnus
89 :type `(choice 89 :type `(choice
90 :tag "auth-source debugging mode" 90 :tag "auth-source debugging mode"
91 (const :tag "Log using `message' to the *Messages* buffer" t) 91 (const :tag "Log using `message' to the *Messages* buffer" t)
92 (function :tag "Function that takes arguments like `message'") 92 (function :tag "Function that takes arguments like `message'")
93 (const :tag "Don't log anything" nil))) 93 (const :tag "Don't log anything" nil)))
94 94
143 ;; set logger to either the function in auth-source-debug or 'message 143 ;; set logger to either the function in auth-source-debug or 'message
144 ;; note that it will be 'message if auth-source-debug is nil, so 144 ;; note that it will be 'message if auth-source-debug is nil, so
145 ;; we also check the value 145 ;; we also check the value
146 (when auth-source-debug 146 (when auth-source-debug
147 (let ((logger (if (functionp auth-source-debug) 147 (let ((logger (if (functionp auth-source-debug)
148 auth-source-debug 148 auth-source-debug
149 'message))) 149 'message)))
150 (apply logger msg)))) 150 (apply logger msg))))
151 151
152 (defun auth-source-pick (host protocol &optional fallback) 152 (defun auth-source-pick (host protocol &optional fallback)
153 "Parse `auth-sources' for HOST, and PROTOCOL matches. 153 "Parse `auth-sources' for HOST, and PROTOCOL matches.