* epa-file.el (epa-file-insert-file-contents): Don't move the
authorueno <ueno>
Mon, 12 Jun 2006 06:26:47 +0000 (06:26 +0000)
committerueno <ueno>
Mon, 12 Jun 2006 06:26:47 +0000 (06:26 +0000)
point to the end of the inserted region.
Reported by doug <douglas.bagley@gmail.com>

ChangeLog
epa-file.el

index c91f0ef..682aa36 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-06-12  Daiki Ueno  <ueno@unixuser.org>
+
+       * epa-file.el (epa-file-insert-file-contents): Don't move the
+       point to the end of the inserted region.
+       Reported by doug <douglas.bagley@gmail.com>
+
 2006-06-01  Daiki Ueno  <ueno@unixuser.org>
 
        * epa-file.el (epa-file-insert-file-contents): Support partial read.
index 3ebf50b..4a59d8d 100644 (file)
          (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)))