From: ueno Date: Sun, 10 Sep 2006 02:53:01 +0000 (+0000) Subject: Undo the last change. X-Git-Tag: epg-0_0_6~27 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=0172d3e38ecbe1cb66363d96645076fd502f7ad7;p=elisp%2Fepg.git Undo the last change. --- diff --git a/ChangeLog b/ChangeLog index 93107b0..2118027 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,3 @@ -2006-09-10 Daiki Ueno - - * epa-file.el (epa-file-insert-file-contents): Use - decode-coding-inserted-region if available. - 2006-09-05 Hiroya Murata * epg-config.el (epg-configuration): Fixed the last change; diff --git a/epa-file.el b/epa-file.el index b1743ee..4a59d8d 100644 --- a/epa-file.el +++ b/epa-file.el @@ -98,25 +98,15 @@ (cons "Opening input file" (cdr error))))) (if (or beg end) (setq string (substring string (or beg 0) end))) + (setq string + (decode-coding-string string + (or coding-system-for-read 'undecided))) (if (boundp 'last-coding-system-used) (set-buffer-file-coding-system last-coding-system-used) (set-buffer-file-coding-system default-buffer-file-coding-system)) (save-excursion - (if (and (null coding-system-for-read) - (fboundp 'decode-coding-inserted-region)) - (save-restriction - (narrow-to-region (point) (point)) - (insert string) - (decode-coding-inserted-region - (point-min) (point-max) - (substring file 0 (string-match epa-file-name-regexp file)) - visit beg end replace) - (setq length (- (point-max) (point-min)))) - (setq string (decode-coding-string string - (or coding-system-for-read - 'undecided)) - length (length string)) - (insert string)) + (insert string) + (setq length (length string)) (if replace (delete-region (point) (point-max))))) (if (and local-copy