From ce51acba4dd3b6d91477ce4fdb39d43989856492 Mon Sep 17 00:00:00 2001 From: ueno Date: Mon, 12 Jun 2006 06:26:47 +0000 Subject: [PATCH] * epa-file.el (epa-file-insert-file-contents): Don't move the point to the end of the inserted region. Reported by doug --- ChangeLog | 6 ++++++ epa-file.el | 9 +++++---- 2 files changed, 11 insertions(+), 4 deletions(-) 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))) -- 1.7.10.4