Simplified.
authorueno <ueno>
Sun, 31 Dec 2006 08:46:55 +0000 (08:46 +0000)
committerueno <ueno>
Sun, 31 Dec 2006 08:46:55 +0000 (08:46 +0000)
epa.el

diff --git a/epa.el b/epa.el
index ac10d7f..f486b8e 100644 (file)
--- a/epa.el
+++ b/epa.el
@@ -787,7 +787,7 @@ Don't use this command in Lisp programs!"
     (save-restriction
       (narrow-to-region start end)
       (goto-char start)
-      (let (armor-start armor-end coding-system)
+      (let (armor-start armor-end)
        (while (re-search-forward "-----BEGIN PGP MESSAGE-----$" nil t)
          (setq armor-start (match-beginning 0)
                armor-end (re-search-forward "^-----END PGP MESSAGE-----$"
@@ -795,12 +795,11 @@ Don't use this command in Lisp programs!"
          (unless armor-end
            (error "No armor tail"))
          (goto-char armor-start)
-         (if (re-search-forward "^Charset: \\(.*\\)" armor-end t)
-             (setq coding-system (epa--find-coding-system-for-mime-charset
-                                  (intern (downcase (match-string 1))))))
          (let ((coding-system-for-read
                 (or coding-system-for-read
-                    coding-system)))
+                    (if (re-search-forward "^Charset: \\(.*\\)" armor-end t)
+                        (epa--find-coding-system-for-mime-charset
+                         (intern (downcase (match-string 1))))))))
            (epa-decrypt-region armor-start armor-end)))))))
 
 ;;;###autoload