diff options
| author | Daiki Ueno | 2008-12-17 02:33:12 +0000 |
|---|---|---|
| committer | Daiki Ueno | 2008-12-17 02:33:12 +0000 |
| commit | 2cb35a563b87760f90e593c7d54b5b1d72d954a4 (patch) | |
| tree | 29a75ef7953b4ff04e7d644469466f54307395ab | |
| parent | bf46b4d4282fd8411876052b759eab7891d0fba9 (diff) | |
| download | emacs-2cb35a563b87760f90e593c7d54b5b1d72d954a4.tar.gz emacs-2cb35a563b87760f90e593c7d54b5b1d72d954a4.zip | |
* epa-file.el (epa-file-insert-file-contents): Set
buffer-file-name before decrypting a file.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/epa-file.el | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 38514d0b0a3..3a3657b4b84 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2008-12-17 Daiki Ueno <ueno@unixuser.org> | ||
| 2 | |||
| 3 | * epa-file.el (epa-file-insert-file-contents): Set | ||
| 4 | buffer-file-name before decrypting a file. | ||
| 5 | |||
| 1 | 2008-12-16 Juanma Barranquero <lekktu@gmail.com> | 6 | 2008-12-16 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 7 | ||
| 3 | * server.el (server-start): If unable to start the server, | 8 | * server.el (server-start): If unable to start the server, |
diff --git a/lisp/epa-file.el b/lisp/epa-file.el index 968b22cc52b..93b6e5bb767 100644 --- a/lisp/epa-file.el +++ b/lisp/epa-file.el | |||
| @@ -110,6 +110,8 @@ | |||
| 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)) | ||
| 113 | (epg-context-set-passphrase-callback | 115 | (epg-context-set-passphrase-callback |
| 114 | context | 116 | context |
| 115 | (cons #'epa-file-passphrase-callback-function | 117 | (cons #'epa-file-passphrase-callback-function |
| @@ -139,9 +141,8 @@ | |||
| 139 | (setq length (- (point-max) (point-min)))) | 141 | (setq length (- (point-max) (point-min)))) |
| 140 | (if replace | 142 | (if replace |
| 141 | (delete-region (point) (point-max))) | 143 | (delete-region (point) (point-max))) |
| 142 | (when visit | 144 | (if visit |
| 143 | (setq buffer-file-name file) | 145 | (set-visited-file-modtime)))) |
| 144 | (set-visited-file-modtime)))) | ||
| 145 | (if (and local-copy | 146 | (if (and local-copy |
| 146 | (file-exists-p local-copy)) | 147 | (file-exists-p local-copy)) |
| 147 | (delete-file local-copy))) | 148 | (delete-file local-copy))) |