Merge branch 'master' of https://git.gnus.org/gnus
[gnus] / lisp / mml1991.el
index c027c5f..8f9076c 100644 (file)
@@ -1,7 +1,7 @@
 ;;; mml1991.el --- Old PGP message format (RFC 1991) support for MML
 
 ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-;;   2007, 2008, 2009  Free Software Foundation, Inc.
+;;   2007, 2008, 2009, 2010  Free Software Foundation, Inc.
 
 ;; Author: Sascha Lüdecke <sascha@meta-x.de>,
 ;;     Simon Josefsson <simon@josefsson.org> (Mailcrypt interface, Gnus glue)
 
 ;; For Emacs < 22.2.
 (eval-and-compile
-  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r))))
+  (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))
+
+  (if (locate-library "password-cache")
+      (require 'password-cache)
+    (require 'password)))
 
 (eval-when-compile
   (require 'cl)
   (require 'mm-util))
 
-(require 'mm-decode)
+(require 'mm-encode)
 (require 'mml-sec)
 
 (defvar mc-pgp-always-sign)
@@ -141,6 +145,7 @@ Whether the passphrase is cached at all is controlled by
       (delete-region (point-min) (point)))
     (mm-with-unibyte-current-buffer
       (with-temp-buffer
+       (inline (mm-disable-multibyte))
        (setq cipher (current-buffer))
        (insert-buffer-substring text)
        (unless (mc-encrypt-generic
@@ -221,6 +226,7 @@ Whether the passphrase is cached at all is controlled by
       (delete-region (point-min) (point)))
     (mm-with-unibyte-current-buffer
       (with-temp-buffer
+       (inline (mm-disable-multibyte))
        (flet ((gpg-encrypt-func
                (sign plaintext ciphertext result recipients &optional
                      passphrase sign-with-key armor textmode)
@@ -329,7 +335,6 @@ Whether the passphrase is cached at all is controlled by
 ;; epg wrapper
 
 (defvar epg-user-id-alist)
-(defvar password-cache-expiry)
 
 (autoload 'epg-make-context "epg")
 (autoload 'epg-passphrase-callback-function "epg")
@@ -449,7 +454,7 @@ If no one is selected, default secret key is used.  "
                               (or (epg-expand-group config recipient)
                                   (list recipient)))
                             recipients))))
-    (if (eq mm-sign-option 'guided)
+    (if (eq mm-encrypt-option 'guided)
        (setq recipients
              (epa-select-keys context "Select recipients for encryption.
 If no one is selected, symmetric encryption will be performed.  "
@@ -516,5 +521,4 @@ If no one is selected, default secret key is used.  "
 ;; coding: iso-8859-1
 ;; End:
 
-;; arch-tag: e542be18-ab28-4393-9b33-97fe9cf30706
 ;;; mml1991.el ends here