From: ueno Date: Mon, 12 Jun 2006 06:26:47 +0000 (+0000) Subject: * epa-file.el (epa-file-insert-file-contents): Don't move the X-Git-Tag: epg-0_0_3~2 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=ce51acba4dd3b6d91477ce4fdb39d43989856492;p=elisp%2Fepg.git * epa-file.el (epa-file-insert-file-contents): Don't move the point to the end of the inserted region. Reported by doug --- diff --git a/ChangeLog b/ChangeLog index c91f0ef..682aa36 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-06-12 Daiki Ueno + + * epa-file.el (epa-file-insert-file-contents): Don't move the + point to the end of the inserted region. + Reported by doug + 2006-06-01 Daiki Ueno * epa-file.el (epa-file-insert-file-contents): Support partial read. diff --git a/epa-file.el b/epa-file.el index 3ebf50b..4a59d8d 100644 --- a/epa-file.el +++ b/epa-file.el @@ -104,10 +104,11 @@ (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)) - (insert string) - (setq length (length string)) - (if replace - (delete-region (point) (point-max)))) + (save-excursion + (insert string) + (setq length (length string)) + (if replace + (delete-region (point) (point-max))))) (if (and local-copy (file-exists-p local-copy)) (delete-file local-copy)))