Convert line endings only if pgg-text-mode is set.
authorueno <ueno>
Sun, 30 Apr 2006 05:45:36 +0000 (05:45 +0000)
committerueno <ueno>
Sun, 30 Apr 2006 05:45:36 +0000 (05:45 +0000)
pgg-epg.el

index c93ffc7..6445c4c 100644 (file)
@@ -125,15 +125,15 @@ passphrase cache or user."
       (erase-buffer))
     (condition-case error
        (setq plain
-             (decode-coding-string
-              (epg-decrypt-string context (buffer-substring start end))
-              'raw-text)
+             (epg-decrypt-string context (buffer-substring start end))
              pgg-epg-secret-key-id-list nil)
       (error
        (while pgg-epg-secret-key-id-list
         (pgg-remove-passphrase-from-cache (car pgg-epg-secret-key-id-list))
         (setq pgg-epg-secret-key-id-list (cdr pgg-epg-secret-key-id-list)))
        (signal (car error) (cdr error))))
+    (if pgg-text-mode
+       (setq plain (decode-coding-string plain 'raw-text)))
     (save-excursion
       (set-buffer (get-buffer-create pgg-output-buffer))
       (insert plain))