summaryrefslogtreecommitdiff
path: root/lisp/gnus
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@unixuser.org>2011-07-03 08:53:45 +0900
committerDaiki Ueno <ueno@unixuser.org>2011-07-03 08:53:45 +0900
commit7f6d634ac2f8117b4635fad890e7bc19087ee806 (patch)
treefa0e486d700ca5f6ff0bc42a029d41cd070c3e65 /lisp/gnus
parent8a20ca4cb08150fa42c18b9b2147226077d9a9b0 (diff)
downloademacs-7f6d634ac2f8117b4635fad890e7bc19087ee806.tar.gz
emacs-7f6d634ac2f8117b4635fad890e7bc19087ee806.tar.bz2
emacs-7f6d634ac2f8117b4635fad890e7bc19087ee806.zip
Style fixes for auth-source.el.
* auth-source.el (auth-source-token-passphrase-callback-function): Reindent. (epg-context-operation): Remove unnecessary autoload.
Diffstat (limited to 'lisp/gnus')
-rw-r--r--lisp/gnus/ChangeLog6
-rw-r--r--lisp/gnus/auth-source.el37
2 files changed, 24 insertions, 19 deletions
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 07a33fad9ad..2d8ab1a613e 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,3 +1,9 @@
+2011-07-02 Daiki Ueno <ueno@unixuser.org>
+
+ * auth-source.el (auth-source-token-passphrase-callback-function):
+ Reindent.
+ (epg-context-operation): Remove unnecessary autoload.
+
2011-07-02 Andrew Cohen <cohen@andy.bu.edu>
* nnir.el (nnir-run-imap): Allow halting a search when an article is
diff --git a/lisp/gnus/auth-source.el b/lisp/gnus/auth-source.el
index 677698ebc96..1a54a27757c 100644
--- a/lisp/gnus/auth-source.el
+++ b/lisp/gnus/auth-source.el
@@ -74,7 +74,6 @@
(autoload 'plstore-save "plstore")
(autoload 'plstore-get-file "plstore")
-(autoload 'epg-context-operation "epg")
(autoload 'epg-make-context "epg")
(autoload 'epg-context-set-passphrase-callback "epg")
(autoload 'epg-decrypt-string "epg")
@@ -1005,24 +1004,24 @@ Note that the MAX parameter is used so we can exit the parse early."
(defvar auth-source-passphrase-alist nil)
(defun auth-source-token-passphrase-callback-function (context key-id file)
- (let* ((file (file-truename file))
- (entry (assoc file auth-source-passphrase-alist))
- passphrase)
- ;; return the saved passphrase, calling a function if needed
- (or (copy-sequence (if (functionp (cdr entry))
- (funcall (cdr entry))
- (cdr entry)))
- (progn
- (unless entry
- (setq entry (list file))
- (push entry auth-source-passphrase-alist))
- (setq passphrase
- (read-passwd
- (format "Passphrase for %s tokens: " file)
- t))
- (setcdr entry (lexical-let ((p (copy-sequence passphrase)))
- (lambda () p)))
- passphrase))))
+ (let* ((file (file-truename file))
+ (entry (assoc file auth-source-passphrase-alist))
+ passphrase)
+ ;; return the saved passphrase, calling a function if needed
+ (or (copy-sequence (if (functionp (cdr entry))
+ (funcall (cdr entry))
+ (cdr entry)))
+ (progn
+ (unless entry
+ (setq entry (list file))
+ (push entry auth-source-passphrase-alist))
+ (setq passphrase
+ (read-passwd
+ (format "Passphrase for %s tokens: " file)
+ t))
+ (setcdr entry (lexical-let ((p (copy-sequence passphrase)))
+ (lambda () p)))
+ passphrase))))
;; (auth-source-epa-extract-gpg-token "gpg:LS0tLS1CRUdJTiBQR1AgTUVTU0FHRS0tLS0tClZlcnNpb246IEdudVBHIHYxLjQuMTEgKEdOVS9MaW51eCkKCmpBMEVBd01DT25qMjB1ak9rZnRneVI3K21iNm9aZWhuLzRad3cySkdlbnVaKzRpeEswWDY5di9icDI1U1dsQT0KPS9yc2wKLS0tLS1FTkQgUEdQIE1FU1NBR0UtLS0tLQo=" "~/.netrc")
(defun auth-source-epa-extract-gpg-token (secret file)