diff options
| author | Chong Yidong | 2011-02-14 17:56:38 -0500 |
|---|---|---|
| committer | Chong Yidong | 2011-02-14 17:56:38 -0500 |
| commit | 35a7fb0b751e71320b8dd749ac4d762bab372257 (patch) | |
| tree | 0bdd3324df8a2c4b6ca48b9e1390017ee614e37a | |
| parent | 07ca555579fd4210c6ac6b487b6a491dc8c66562 (diff) | |
| download | emacs-35a7fb0b751e71320b8dd749ac4d762bab372257.tar.gz emacs-35a7fb0b751e71320b8dd749ac4d762bab372257.zip | |
Bind delete-by-moving-to-trash to nil in pgg-*.el.
This change should not be merged into the trunk.
* pgg-gpg.el (pgg-gpg-process-region): Bind
delete-by-moving-to-trash to nil.
* pgg-pgp.el (pgg-pgp-process-region, pgg-pgp-verify-region)
(pgg-pgp-snarf-keys-region):
* pgg-pgp5.el (pgg-pgp5-process-region, pgg-pgp5-verify-region)
(pgg-pgp5-snarf-keys-region): Likewise.
| -rw-r--r-- | lisp/ChangeLog | 10 | ||||
| -rw-r--r-- | lisp/pgg-gpg.el | 3 | ||||
| -rw-r--r-- | lisp/pgg-pgp.el | 13 | ||||
| -rw-r--r-- | lisp/pgg-pgp5.el | 13 |
4 files changed, 30 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b77700491c7..9d8446cef10 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,13 @@ | |||
| 1 | 2011-02-14 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * pgg-gpg.el (pgg-gpg-process-region): Bind | ||
| 4 | delete-by-moving-to-trash to nil. | ||
| 5 | |||
| 6 | * pgg-pgp.el (pgg-pgp-process-region, pgg-pgp-verify-region) | ||
| 7 | (pgg-pgp-snarf-keys-region): | ||
| 8 | * pgg-pgp5.el (pgg-pgp5-process-region, pgg-pgp5-verify-region) | ||
| 9 | (pgg-pgp5-snarf-keys-region): Likewise. | ||
| 10 | |||
| 1 | 2011-02-12 Chong Yidong <cyd@stupidchicken.com> | 11 | 2011-02-12 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 12 | ||
| 3 | * files.el (copy-directory): Revert to pre-2011-01-29 version. | 13 | * files.el (copy-directory): Revert to pre-2011-01-29 version. |
diff --git a/lisp/pgg-gpg.el b/lisp/pgg-gpg.el index 2019f88bf15..0666b209aba 100644 --- a/lisp/pgg-gpg.el +++ b/lisp/pgg-gpg.el | |||
| @@ -130,7 +130,8 @@ | |||
| 130 | (if (and process (eq 'run (process-status process))) | 130 | (if (and process (eq 'run (process-status process))) |
| 131 | (interrupt-process process)) | 131 | (interrupt-process process)) |
| 132 | (if (file-exists-p output-file-name) | 132 | (if (file-exists-p output-file-name) |
| 133 | (delete-file output-file-name)) | 133 | (let ((delete-by-moving-to-trash nil)) |
| 134 | (delete-file output-file-name))) | ||
| 134 | (set-default-file-modes orig-mode)))) | 135 | (set-default-file-modes orig-mode)))) |
| 135 | 136 | ||
| 136 | (defun pgg-gpg-possibly-cache-passphrase (passphrase &optional key notruncate) | 137 | (defun pgg-gpg-possibly-cache-passphrase (passphrase &optional key notruncate) |
diff --git a/lisp/pgg-pgp.el b/lisp/pgg-pgp.el index 42d91fb2b80..e36c1efb138 100644 --- a/lisp/pgg-pgp.el +++ b/lisp/pgg-pgp.el | |||
| @@ -108,7 +108,8 @@ Bourne shell or its equivalent \(not tcsh) is needed for \"2>\"." | |||
| 108 | (if (and process (eq 'run (process-status process))) | 108 | (if (and process (eq 'run (process-status process))) |
| 109 | (interrupt-process process)) | 109 | (interrupt-process process)) |
| 110 | (condition-case nil | 110 | (condition-case nil |
| 111 | (delete-file errors-file-name) | 111 | (let ((delete-by-moving-to-trash nil)) |
| 112 | (delete-file errors-file-name)) | ||
| 112 | (file-error nil))))) | 113 | (file-error nil))))) |
| 113 | 114 | ||
| 114 | (defun pgg-pgp-lookup-key (string &optional type) | 115 | (defun pgg-pgp-lookup-key (string &optional type) |
| @@ -215,8 +216,11 @@ passphrase cache or user." | |||
| 215 | (setq args (concat args " " (shell-quote-argument signature))))) | 216 | (setq args (concat args " " (shell-quote-argument signature))))) |
| 216 | (setq args (concat args " " (shell-quote-argument orig-file))) | 217 | (setq args (concat args " " (shell-quote-argument orig-file))) |
| 217 | (pgg-pgp-process-region (point)(point) nil pgg-pgp-program args) | 218 | (pgg-pgp-process-region (point)(point) nil pgg-pgp-program args) |
| 218 | (delete-file orig-file) | 219 | (let ((delete-by-moving-to-trash nil)) |
| 219 | (if signature (delete-file signature)) | 220 | (delete-file orig-file)) |
| 221 | (if signature | ||
| 222 | (let ((delete-by-moving-to-trash nil)) | ||
| 223 | (delete-file signature))) | ||
| 220 | (pgg-process-when-success | 224 | (pgg-process-when-success |
| 221 | (goto-char (point-min)) | 225 | (goto-char (point-min)) |
| 222 | (let ((case-fold-search t)) | 226 | (let ((case-fold-search t)) |
| @@ -248,7 +252,8 @@ passphrase cache or user." | |||
| 248 | (let ((coding-system-for-write 'raw-text-dos)) | 252 | (let ((coding-system-for-write 'raw-text-dos)) |
| 249 | (write-region start end key-file)) | 253 | (write-region start end key-file)) |
| 250 | (pgg-pgp-process-region start end nil pgg-pgp-program args) | 254 | (pgg-pgp-process-region start end nil pgg-pgp-program args) |
| 251 | (delete-file key-file) | 255 | (let ((delete-by-moving-to-trash nil)) |
| 256 | (delete-file key-file)) | ||
| 252 | (pgg-process-when-success nil))) | 257 | (pgg-process-when-success nil))) |
| 253 | 258 | ||
| 254 | (provide 'pgg-pgp) | 259 | (provide 'pgg-pgp) |
diff --git a/lisp/pgg-pgp5.el b/lisp/pgg-pgp5.el index d174e4873a9..baa0f95265d 100644 --- a/lisp/pgg-pgp5.el +++ b/lisp/pgg-pgp5.el | |||
| @@ -124,7 +124,8 @@ Bourne shell or its equivalent \(not tcsh) is needed for \"2>\"." | |||
| 124 | (if (and process (eq 'run (process-status process))) | 124 | (if (and process (eq 'run (process-status process))) |
| 125 | (interrupt-process process)) | 125 | (interrupt-process process)) |
| 126 | (condition-case nil | 126 | (condition-case nil |
| 127 | (delete-file errors-file-name) | 127 | (let ((delete-by-moving-to-trash nil)) |
| 128 | (delete-file errors-file-name)) | ||
| 128 | (file-error nil))))) | 129 | (file-error nil))))) |
| 129 | 130 | ||
| 130 | (defun pgg-pgp5-lookup-key (string &optional type) | 131 | (defun pgg-pgp5-lookup-key (string &optional type) |
| @@ -219,8 +220,11 @@ Bourne shell or its equivalent \(not tcsh) is needed for \"2>\"." | |||
| 219 | (copy-file signature (setq signature (concat orig-file ".asc"))) | 220 | (copy-file signature (setq signature (concat orig-file ".asc"))) |
| 220 | (setq args (append args (list signature)))) | 221 | (setq args (append args (list signature)))) |
| 221 | (pgg-pgp5-process-region (point)(point) nil pgg-pgp5-pgpv-program args) | 222 | (pgg-pgp5-process-region (point)(point) nil pgg-pgp5-pgpv-program args) |
| 222 | (delete-file orig-file) | 223 | (let ((delete-by-moving-to-trash nil)) |
| 223 | (if signature (delete-file signature)) | 224 | (delete-file orig-file)) |
| 225 | (if signature | ||
| 226 | (let ((delete-by-moving-to-trash nil)) | ||
| 227 | (delete-file signature))) | ||
| 224 | (with-current-buffer pgg-errors-buffer | 228 | (with-current-buffer pgg-errors-buffer |
| 225 | (goto-char (point-min)) | 229 | (goto-char (point-min)) |
| 226 | (if (re-search-forward "^Good signature" nil t) | 230 | (if (re-search-forward "^Good signature" nil t) |
| @@ -249,7 +253,8 @@ Bourne shell or its equivalent \(not tcsh) is needed for \"2>\"." | |||
| 249 | (let ((coding-system-for-write 'raw-text-dos)) | 253 | (let ((coding-system-for-write 'raw-text-dos)) |
| 250 | (write-region start end key-file)) | 254 | (write-region start end key-file)) |
| 251 | (pgg-pgp5-process-region start end nil pgg-pgp5-pgpk-program args) | 255 | (pgg-pgp5-process-region start end nil pgg-pgp5-pgpk-program args) |
| 252 | (delete-file key-file) | 256 | (let ((delete-by-moving-to-trash nil)) |
| 257 | (delete-file key-file)) | ||
| 253 | (pgg-process-when-success nil))) | 258 | (pgg-process-when-success nil))) |
| 254 | 259 | ||
| 255 | (provide 'pgg-pgp5) | 260 | (provide 'pgg-pgp5) |