emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/pgg-gpg.el


From: Reiner Steib
Subject: [Emacs-diffs] Changes to emacs/lisp/pgg-gpg.el
Date: Tue, 21 Mar 2006 21:24:27 +0000

Index: emacs/lisp/pgg-gpg.el
diff -u emacs/lisp/pgg-gpg.el:1.5 emacs/lisp/pgg-gpg.el:1.6
--- emacs/lisp/pgg-gpg.el:1.5   Tue Mar 21 14:27:05 2006
+++ emacs/lisp/pgg-gpg.el       Tue Mar 21 21:24:27 2006
@@ -163,24 +163,22 @@
   (let ((args (list "--with-colons" "--no-greeting" "--batch"
                    (if all "--list-secret-keys" "--list-keys")
                    string))
-        (key-regexp (concat "^\\(sec\\|pub\\)"
-                            ":[^:]*:[^:]*:[^:]*:\\([^:]*\\):[^:]*"
-                            ":[^:]*:[^:]*:[^:]*:\\([^:]*\\):"))
-        )
+       (key-regexp (concat "^\\(sec\\|pub\\)"
+                           ":[^:]*:[^:]*:[^:]*:\\([^:]*\\):[^:]*"
+                           ":[^:]*:[^:]*:[^:]*:\\([^:]*\\):")))
     (with-temp-buffer
       (apply #'call-process pgg-gpg-program nil t nil args)
       (goto-char (point-min))
       (if (re-search-forward key-regexp
-                             nil t)
-          (match-string 3)))))
+                            nil t)
+         (match-string 3)))))
 
 (defun pgg-gpg-key-id-from-key-owner (key-owner)
   (cond ((not key-owner) nil)
-        ;; Extract bare key id from outermost paired angle brackets, if any:
-        ((string-match "[^<]*<\\(.+\\)>[^>]*" key-owner)
-         (substring key-owner (match-beginning 1)(match-end 1)))
-        (key-owner))
-  )
+       ;; Extract bare key id from outermost paired angle brackets, if any:
+       ((string-match "[^<]*<\\(.+\\)>[^>]*" key-owner)
+        (substring key-owner (match-beginning 1)(match-end 1)))
+       (key-owner)))
 
 (defun pgg-gpg-encrypt-region (start end recipients &optional sign passphrase)
   "Encrypt the current region between START and END.
@@ -242,15 +240,15 @@
                         (insert-buffer-substring current-buffer)
                         (pgg-decode-armor-region (point-min) (point-max))))
         (secret-keys (pgg-gpg-lookup-all-secret-keys))
-         ;; XXX the user is stuck if they need to use the passphrase for
-         ;;     any but the first secret key for which the message is
-         ;;     encrypted.  ideally, we would incrementally give them a
-         ;;     chance with subsequent keys each time they fail with one.
+        ;; XXX the user is stuck if they need to use the passphrase for
+        ;;     any but the first secret key for which the message is
+        ;;     encrypted.  ideally, we would incrementally give them a
+        ;;     chance with subsequent keys each time they fail with one.
         (key (pgg-gpg-select-matching-key message-keys secret-keys))
-         (key-owner (and key (pgg-gpg-lookup-key-owner key t)))
+        (key-owner (and key (pgg-gpg-lookup-key-owner key t)))
         (key-id (pgg-gpg-key-id-from-key-owner key-owner))
         (pgg-gpg-user-id (or key-id key
-                             pgg-gpg-user-id pgg-default-user-id))
+                             pgg-gpg-user-id pgg-default-user-id))
         (passphrase (or passphrase
                         (when (not pgg-gpg-use-agent)
                           (pgg-read-passphrase
@@ -280,7 +278,7 @@
   (loop for message-key in message-keys
        for message-key-id = (and (equal (car message-key) 1)
                                  (cdr (assq 'key-identifier
-                                             (cdr message-key))))
+                                            (cdr message-key))))
        for key = (and message-key-id (pgg-lookup-key message-key-id 'encrypt))
        when (and key (member key secret-keys)) return key))
 




reply via email to

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