diff options
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/epa-file.el | 7 | ||||
| -rw-r--r-- | lisp/epa-hook.el | 3 |
3 files changed, 13 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8dade0843ec..6d295bdb156 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2008-12-10 Daiki Ueno <ueno@unixuser.org> | ||
| 2 | |||
| 3 | * epa-hook.el (epa-file-find-file-hook): Don't mark the current | ||
| 4 | buffer unmodified. (Bug#1509) | ||
| 5 | * epa-file.el (epa-file-insert-file-contents): Set buffer's | ||
| 6 | modification time if visiting a file and the content is | ||
| 7 | successfully decrypted. | ||
| 8 | |||
| 1 | 2008-12-09 Chong Yidong <cyd@stupidchicken.com> | 9 | 2008-12-09 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 10 | ||
| 3 | * files.el (save-some-buffers): At each map-y-or-n-p iteration, | 11 | * files.el (save-some-buffers): At each map-y-or-n-p iteration, |
diff --git a/lisp/epa-file.el b/lisp/epa-file.el index abc5bde7277..968b22cc52b 100644 --- a/lisp/epa-file.el +++ b/lisp/epa-file.el | |||
| @@ -110,8 +110,6 @@ | |||
| 110 | (local-file (or local-copy file)) | 110 | (local-file (or local-copy file)) |
| 111 | (context (epg-make-context)) | 111 | (context (epg-make-context)) |
| 112 | string length entry) | 112 | string length entry) |
| 113 | (if visit | ||
| 114 | (setq buffer-file-name file)) | ||
| 115 | (epg-context-set-passphrase-callback | 113 | (epg-context-set-passphrase-callback |
| 116 | context | 114 | context |
| 117 | (cons #'epa-file-passphrase-callback-function | 115 | (cons #'epa-file-passphrase-callback-function |
| @@ -140,7 +138,10 @@ | |||
| 140 | (epa-file-decode-and-insert string file visit beg end replace) | 138 | (epa-file-decode-and-insert string file visit beg end replace) |
| 141 | (setq length (- (point-max) (point-min)))) | 139 | (setq length (- (point-max) (point-min)))) |
| 142 | (if replace | 140 | (if replace |
| 143 | (delete-region (point) (point-max))))) | 141 | (delete-region (point) (point-max))) |
| 142 | (when visit | ||
| 143 | (setq buffer-file-name file) | ||
| 144 | (set-visited-file-modtime)))) | ||
| 144 | (if (and local-copy | 145 | (if (and local-copy |
| 145 | (file-exists-p local-copy)) | 146 | (file-exists-p local-copy)) |
| 146 | (delete-file local-copy))) | 147 | (delete-file local-copy))) |
diff --git a/lisp/epa-hook.el b/lisp/epa-hook.el index dc2f535f7d0..f7110cea8bd 100644 --- a/lisp/epa-hook.el +++ b/lisp/epa-hook.el | |||
| @@ -79,8 +79,7 @@ May either be a string or a list of strings.") | |||
| 79 | (if (and buffer-file-name | 79 | (if (and buffer-file-name |
| 80 | (string-match epa-file-name-regexp buffer-file-name) | 80 | (string-match epa-file-name-regexp buffer-file-name) |
| 81 | epa-file-inhibit-auto-save) | 81 | epa-file-inhibit-auto-save) |
| 82 | (auto-save-mode 0)) | 82 | (auto-save-mode 0))) |
| 83 | (set-buffer-modified-p nil)) | ||
| 84 | 83 | ||
| 85 | (define-minor-mode auto-encryption-mode | 84 | (define-minor-mode auto-encryption-mode |
| 86 | "Toggle automatic file encryption and decryption. | 85 | "Toggle automatic file encryption and decryption. |