]> git.eshelyaron.com Git - emacs.git/commitdiff
* epa-file.el (epa-file-insert-file-contents): Set
authorDaiki Ueno <ueno@unixuser.org>
Wed, 17 Dec 2008 02:33:12 +0000 (02:33 +0000)
committerDaiki Ueno <ueno@unixuser.org>
Wed, 17 Dec 2008 02:33:12 +0000 (02:33 +0000)
buffer-file-name before decrypting a file.

lisp/ChangeLog
lisp/epa-file.el

index 38514d0b0a33f286ddbefaf96eb3ad5657d2ceed..3a3657b4b84d328ba1093d963a7449780c18f8b4 100644 (file)
@@ -1,3 +1,8 @@
+2008-12-17  Daiki Ueno  <ueno@unixuser.org>
+
+       * epa-file.el (epa-file-insert-file-contents): Set
+       buffer-file-name before decrypting a file.
+
 2008-12-16  Juanma Barranquero  <lekktu@gmail.com>
 
        * server.el (server-start): If unable to start the server,
index 968b22cc52b6bd04f6c953a98e4be5587f202ee0..93b6e5bb767bc9df34b020e58d28b304aab3bd38 100644 (file)
         (local-file (or local-copy file))
         (context (epg-make-context))
         string length entry)
+    (if visit
+       (setq buffer-file-name file))
     (epg-context-set-passphrase-callback
      context
      (cons #'epa-file-passphrase-callback-function
              (setq length (- (point-max) (point-min))))
            (if replace
                (delete-region (point) (point-max)))
-           (when visit
-             (setq buffer-file-name file)
-             (set-visited-file-modtime))))
+           (if visit
+               (set-visited-file-modtime))))
       (if (and local-copy
               (file-exists-p local-copy))
          (delete-file local-copy)))