]> git.eshelyaron.com Git - emacs.git/commitdiff
* epa-hook.el (epa-file-find-file-hook): Don't mark the current
authorDaiki Ueno <ueno@unixuser.org>
Wed, 10 Dec 2008 01:35:39 +0000 (01:35 +0000)
committerDaiki Ueno <ueno@unixuser.org>
Wed, 10 Dec 2008 01:35:39 +0000 (01:35 +0000)
buffer unmodified.  (Bug#1509)
* epa-file.el (epa-file-insert-file-contents): Set buffer's
modification time if visiting a file and the content is
successfully decrypted.

lisp/ChangeLog
lisp/epa-file.el
lisp/epa-hook.el

index 8dade0843ec5ef1c2d3ea8371ad683de0af60a59..6d295bdb156304dd57f0a66489abdade7e5554b9 100644 (file)
@@ -1,3 +1,11 @@
+2008-12-10  Daiki Ueno  <ueno@unixuser.org>
+
+       * epa-hook.el (epa-file-find-file-hook): Don't mark the current
+       buffer unmodified.  (Bug#1509)
+       * epa-file.el (epa-file-insert-file-contents): Set buffer's
+       modification time if visiting a file and the content is
+       successfully decrypted.
+
 2008-12-09  Chong Yidong  <cyd@stupidchicken.com>
 
        * files.el (save-some-buffers): At each map-y-or-n-p iteration,
index abc5bde727739c4173a17977f51d0ed3552d5fc4..968b22cc52b6bd04f6c953a98e4be5587f202ee0 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
              (epa-file-decode-and-insert string file visit beg end replace)
              (setq length (- (point-max) (point-min))))
            (if replace
-               (delete-region (point) (point-max)))))
+               (delete-region (point) (point-max)))
+           (when visit
+             (setq buffer-file-name file)
+             (set-visited-file-modtime))))
       (if (and local-copy
               (file-exists-p local-copy))
          (delete-file local-copy)))
index dc2f535f7d0e0bd444292e06fb2ae6770867579f..f7110cea8bdfce3cce4ca17d23e870013dac055e 100644 (file)
@@ -79,8 +79,7 @@ May either be a string or a list of strings.")
   (if (and buffer-file-name
           (string-match epa-file-name-regexp buffer-file-name)
           epa-file-inhibit-auto-save)
-      (auto-save-mode 0))
-  (set-buffer-modified-p nil))
+      (auto-save-mode 0)))
 
 (define-minor-mode auto-encryption-mode
   "Toggle automatic file encryption and decryption.