diff options
| author | Stefan Monnier | 2021-05-18 19:23:54 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2021-05-18 19:23:54 -0400 |
| commit | 25bb250e292d8129db0e5bd9978c67aee05bccf5 (patch) | |
| tree | 7784f8578acea040135d9905d9a36ca592b266c2 | |
| parent | 26041ec8d518806e29566af4428bb61d6d36d0b7 (diff) | |
| download | emacs-25bb250e292d8129db0e5bd9978c67aee05bccf5.tar.gz emacs-25bb250e292d8129db0e5bd9978c67aee05bccf5.zip | |
* lisp/net/sieve-manage.el (sieve-sasl-auth): Use proper closures
| -rw-r--r-- | lisp/net/sieve-manage.el | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/lisp/net/sieve-manage.el b/lisp/net/sieve-manage.el index 5dad5f446ac..1f08a15e570 100644 --- a/lisp/net/sieve-manage.el +++ b/lisp/net/sieve-manage.el | |||
| @@ -89,18 +89,15 @@ | |||
| 89 | 89 | ||
| 90 | (defcustom sieve-manage-log "*sieve-manage-log*" | 90 | (defcustom sieve-manage-log "*sieve-manage-log*" |
| 91 | "Name of buffer for managesieve session trace." | 91 | "Name of buffer for managesieve session trace." |
| 92 | :type 'string | 92 | :type 'string) |
| 93 | :group 'sieve-manage) | ||
| 94 | 93 | ||
| 95 | (defcustom sieve-manage-server-eol "\r\n" | 94 | (defcustom sieve-manage-server-eol "\r\n" |
| 96 | "The EOL string sent from the server." | 95 | "The EOL string sent from the server." |
| 97 | :type 'string | 96 | :type 'string) |
| 98 | :group 'sieve-manage) | ||
| 99 | 97 | ||
| 100 | (defcustom sieve-manage-client-eol "\r\n" | 98 | (defcustom sieve-manage-client-eol "\r\n" |
| 101 | "The EOL string we send to the server." | 99 | "The EOL string we send to the server." |
| 102 | :type 'string | 100 | :type 'string) |
| 103 | :group 'sieve-manage) | ||
| 104 | 101 | ||
| 105 | (defcustom sieve-manage-authenticators '(digest-md5 | 102 | (defcustom sieve-manage-authenticators '(digest-md5 |
| 106 | cram-md5 | 103 | cram-md5 |
| @@ -112,8 +109,7 @@ | |||
| 112 | ;; FIXME Improve this. It's not `set'. | 109 | ;; FIXME Improve this. It's not `set'. |
| 113 | ;; It's like (repeat (choice (const ...))), where each choice can | 110 | ;; It's like (repeat (choice (const ...))), where each choice can |
| 114 | ;; only appear once. | 111 | ;; only appear once. |
| 115 | :type '(repeat symbol) | 112 | :type '(repeat symbol)) |
| 116 | :group 'sieve-manage) | ||
| 117 | 113 | ||
| 118 | (defcustom sieve-manage-authenticator-alist | 114 | (defcustom sieve-manage-authenticator-alist |
| 119 | '((cram-md5 sieve-manage-cram-md5-p sieve-manage-cram-md5-auth) | 115 | '((cram-md5 sieve-manage-cram-md5-p sieve-manage-cram-md5-auth) |
| @@ -130,26 +126,22 @@ NAME names the authenticator. CHECK is a function returning non-nil if | |||
| 130 | the server support the authenticator and AUTHENTICATE is a function | 126 | the server support the authenticator and AUTHENTICATE is a function |
| 131 | for doing the actual authentication." | 127 | for doing the actual authentication." |
| 132 | :type '(repeat (list (symbol :tag "Name") (function :tag "Check function") | 128 | :type '(repeat (list (symbol :tag "Name") (function :tag "Check function") |
| 133 | (function :tag "Authentication function"))) | 129 | (function :tag "Authentication function")))) |
| 134 | :group 'sieve-manage) | ||
| 135 | 130 | ||
| 136 | (defcustom sieve-manage-default-port "sieve" | 131 | (defcustom sieve-manage-default-port "sieve" |
| 137 | "Default port number or service name for managesieve protocol." | 132 | "Default port number or service name for managesieve protocol." |
| 138 | :type '(choice integer string) | 133 | :type '(choice integer string) |
| 139 | :version "24.4" | 134 | :version "24.4") |
| 140 | :group 'sieve-manage) | ||
| 141 | 135 | ||
| 142 | (defcustom sieve-manage-default-stream 'network | 136 | (defcustom sieve-manage-default-stream 'network |
| 143 | "Default stream type to use for `sieve-manage'." | 137 | "Default stream type to use for `sieve-manage'." |
| 144 | :version "24.1" | 138 | :version "24.1" |
| 145 | :type 'symbol | 139 | :type 'symbol) |
| 146 | :group 'sieve-manage) | ||
| 147 | 140 | ||
| 148 | (defcustom sieve-manage-ignore-starttls nil | 141 | (defcustom sieve-manage-ignore-starttls nil |
| 149 | "Ignore STARTTLS even if STARTTLS capability is provided." | 142 | "Ignore STARTTLS even if STARTTLS capability is provided." |
| 150 | :version "26.1" | 143 | :version "26.1" |
| 151 | :type 'boolean | 144 | :type 'boolean) |
| 152 | :group 'sieve-manage) | ||
| 153 | 145 | ||
| 154 | ;; Internal variables: | 146 | ;; Internal variables: |
| 155 | 147 | ||
| @@ -247,7 +239,7 @@ Return the buffer associated with the connection." | |||
| 247 | (sasl-read-passphrase | 239 | (sasl-read-passphrase |
| 248 | ;; We *need* to copy the password, because sasl will modify it | 240 | ;; We *need* to copy the password, because sasl will modify it |
| 249 | ;; somehow. | 241 | ;; somehow. |
| 250 | `(lambda (prompt) ,(copy-sequence user-password))) | 242 | (lambda (_prompt) (copy-sequence user-password))) |
| 251 | (step (sasl-next-step client nil)) | 243 | (step (sasl-next-step client nil)) |
| 252 | (_tag (sieve-manage-send | 244 | (_tag (sieve-manage-send |
| 253 | (concat | 245 | (concat |