aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaiki Ueno2011-07-03 08:53:45 +0900
committerDaiki Ueno2011-07-03 08:53:45 +0900
commit7f6d634ac2f8117b4635fad890e7bc19087ee806 (patch)
treefa0e486d700ca5f6ff0bc42a029d41cd070c3e65
parent8a20ca4cb08150fa42c18b9b2147226077d9a9b0 (diff)
downloademacs-7f6d634ac2f8117b4635fad890e7bc19087ee806.tar.gz
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.
-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 @@
12011-07-02 Daiki Ueno <ueno@unixuser.org>
2
3 * auth-source.el (auth-source-token-passphrase-callback-function):
4 Reindent.
5 (epg-context-operation): Remove unnecessary autoload.
6
12011-07-02 Andrew Cohen <cohen@andy.bu.edu> 72011-07-02 Andrew Cohen <cohen@andy.bu.edu>
2 8
3 * nnir.el (nnir-run-imap): Allow halting a search when an article is 9 * 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 @@
74(autoload 'plstore-save "plstore") 74(autoload 'plstore-save "plstore")
75(autoload 'plstore-get-file "plstore") 75(autoload 'plstore-get-file "plstore")
76 76
77(autoload 'epg-context-operation "epg")
78(autoload 'epg-make-context "epg") 77(autoload 'epg-make-context "epg")
79(autoload 'epg-context-set-passphrase-callback "epg") 78(autoload 'epg-context-set-passphrase-callback "epg")
80(autoload 'epg-decrypt-string "epg") 79(autoload 'epg-decrypt-string "epg")
@@ -1005,24 +1004,24 @@ Note that the MAX parameter is used so we can exit the parse early."
1005(defvar auth-source-passphrase-alist nil) 1004(defvar auth-source-passphrase-alist nil)
1006 1005
1007(defun auth-source-token-passphrase-callback-function (context key-id file) 1006(defun auth-source-token-passphrase-callback-function (context key-id file)
1008 (let* ((file (file-truename file)) 1007 (let* ((file (file-truename file))
1009 (entry (assoc file auth-source-passphrase-alist)) 1008 (entry (assoc file auth-source-passphrase-alist))
1010 passphrase) 1009 passphrase)
1011 ;; return the saved passphrase, calling a function if needed 1010 ;; return the saved passphrase, calling a function if needed
1012 (or (copy-sequence (if (functionp (cdr entry)) 1011 (or (copy-sequence (if (functionp (cdr entry))
1013 (funcall (cdr entry)) 1012 (funcall (cdr entry))
1014 (cdr entry))) 1013 (cdr entry)))
1015 (progn 1014 (progn
1016 (unless entry 1015 (unless entry
1017 (setq entry (list file)) 1016 (setq entry (list file))
1018 (push entry auth-source-passphrase-alist)) 1017 (push entry auth-source-passphrase-alist))
1019 (setq passphrase 1018 (setq passphrase
1020 (read-passwd 1019 (read-passwd
1021 (format "Passphrase for %s tokens: " file) 1020 (format "Passphrase for %s tokens: " file)
1022 t)) 1021 t))
1023 (setcdr entry (lexical-let ((p (copy-sequence passphrase))) 1022 (setcdr entry (lexical-let ((p (copy-sequence passphrase)))
1024 (lambda () p))) 1023 (lambda () p)))
1025 passphrase)))) 1024 passphrase))))
1026 1025
1027;; (auth-source-epa-extract-gpg-token "gpg:LS0tLS1CRUdJTiBQR1AgTUVTU0FHRS0tLS0tClZlcnNpb246IEdudVBHIHYxLjQuMTEgKEdOVS9MaW51eCkKCmpBMEVBd01DT25qMjB1ak9rZnRneVI3K21iNm9aZWhuLzRad3cySkdlbnVaKzRpeEswWDY5di9icDI1U1dsQT0KPS9yc2wKLS0tLS1FTkQgUEdQIE1FU1NBR0UtLS0tLQo=" "~/.netrc") 1026;; (auth-source-epa-extract-gpg-token "gpg:LS0tLS1CRUdJTiBQR1AgTUVTU0FHRS0tLS0tClZlcnNpb246IEdudVBHIHYxLjQuMTEgKEdOVS9MaW51eCkKCmpBMEVBd01DT25qMjB1ak9rZnRneVI3K21iNm9aZWhuLzRad3cySkdlbnVaKzRpeEswWDY5di9icDI1U1dsQT0KPS9yc2wKLS0tLS1FTkQgUEdQIE1FU1NBR0UtLS0tLQo=" "~/.netrc")
1028(defun auth-source-epa-extract-gpg-token (secret file) 1027(defun auth-source-epa-extract-gpg-token (secret file)