emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r104893: Style fixes for auth-source.


From: Daiki Ueno
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r104893: Style fixes for auth-source.el.
Date: Sun, 03 Jul 2011 08:53:45 +0900
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 104893
committer: Daiki Ueno <address@hidden>
branch nick: trunk
timestamp: Sun 2011-07-03 08:53:45 +0900
message:
  Style fixes for auth-source.el.
  
  * auth-source.el (auth-source-token-passphrase-callback-function):
  Reindent.
  (epg-context-operation): Remove unnecessary autoload.
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/auth-source.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2011-07-02 13:26:49 +0000
+++ b/lisp/gnus/ChangeLog       2011-07-02 23:53:45 +0000
@@ -1,3 +1,9 @@
+2011-07-02  Daiki Ueno  <address@hidden>
+
+       * auth-source.el (auth-source-token-passphrase-callback-function):
+       Reindent.
+       (epg-context-operation): Remove unnecessary autoload.
+
 2011-07-02  Andrew Cohen  <address@hidden>
 
        * nnir.el (nnir-run-imap): Allow halting a search when an article is

=== modified file 'lisp/gnus/auth-source.el'
--- a/lisp/gnus/auth-source.el  2011-07-01 14:05:59 +0000
+++ b/lisp/gnus/auth-source.el  2011-07-02 23:53:45 +0000
@@ -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 @@
 (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)


reply via email to

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