(imap-quote-specials): New function.
[gnus] / lisp / pgg-gpg.el
index 293431b..5cc48c5 100644 (file)
          (save-excursion
            (if (looking-at "\\[GNUPG:] \\([A-Z_]+\\)\\>.*")
                (let* ((status (match-string 1))
-                      (symbol (intern-soft (concat "pgg-gpg-status-" status)))
-                      (entry (member status pgg-gpg-pending-status-list)))
-                 (if entry
-                     (setq pgg-gpg-pending-status-list
-                           (delq (car entry)
-                                 pgg-gpg-pending-status-list)))
+                      (symbol (intern-soft (concat "pgg-gpg-status-"
+                                                   status))))
+                 (if (member status pgg-gpg-pending-status-list)
+                     (setq pgg-gpg-pending-status-list nil))
                  (if (and symbol
                           (fboundp symbol))
                      (funcall symbol process (buffer-substring
@@ -256,7 +254,7 @@ If optional argument SIGN is non-nil, do a combined sign and encrypt."
                                          (list pgg-gpg-user-id))))))))
         (process (pgg-gpg-start-process args)))
     (if (and sign (not pgg-gpg-use-agent))
-       (pgg-gpg-wait-for-status process '("GOOD_PASSPHRASE")))
+       (pgg-gpg-wait-for-status process '("BEGIN_SIGNING" "GOOD_PASSPHRASE")))
     (process-send-region process start end)
     (pgg-gpg-wait-for-completion process)
     (save-excursion
@@ -303,7 +301,7 @@ If optional argument SIGN is non-nil, do a combined sign and encrypt."
                  (if pgg-text-mode '("--textmode"))))
         (process (pgg-gpg-start-process args)))
     (unless pgg-gpg-use-agent
-      (pgg-gpg-wait-for-status process '("GOOD_PASSPHRASE")))
+      (pgg-gpg-wait-for-status process '("BEGIN_SIGNING" "GOOD_PASSPHRASE")))
     (process-send-region process start end)
     (pgg-gpg-wait-for-completion process)
     (save-excursion