(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-----$"
(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