diff options
author | Chong Yidong <cyd@stupidchicken.com> | 2011-02-14 17:56:38 -0500 |
---|---|---|
committer | Chong Yidong <cyd@stupidchicken.com> | 2011-02-14 17:56:38 -0500 |
commit | 35a7fb0b751e71320b8dd749ac4d762bab372257 (patch) | |
tree | 0bdd3324df8a2c4b6ca48b9e1390017ee614e37a /lisp | |
parent | 07ca555579fd4210c6ac6b487b6a491dc8c66562 (diff) | |
download | emacs-35a7fb0b751e71320b8dd749ac4d762bab372257.tar.gz |
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.
Diffstat (limited to 'lisp')
-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 @@ +2011-02-14 Chong Yidong <cyd@stupidchicken.com> + + * 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. + 2011-02-12 Chong Yidong <cyd@stupidchicken.com> * 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 @@ (if (and process (eq 'run (process-status process))) (interrupt-process process)) (if (file-exists-p output-file-name) - (delete-file output-file-name)) + (let ((delete-by-moving-to-trash nil)) + (delete-file output-file-name))) (set-default-file-modes orig-mode)))) (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>\"." (if (and process (eq 'run (process-status process))) (interrupt-process process)) (condition-case nil - (delete-file errors-file-name) + (let ((delete-by-moving-to-trash nil)) + (delete-file errors-file-name)) (file-error nil))))) (defun pgg-pgp-lookup-key (string &optional type) @@ -215,8 +216,11 @@ passphrase cache or user." (setq args (concat args " " (shell-quote-argument signature))))) (setq args (concat args " " (shell-quote-argument orig-file))) (pgg-pgp-process-region (point)(point) nil pgg-pgp-program args) - (delete-file orig-file) - (if signature (delete-file signature)) + (let ((delete-by-moving-to-trash nil)) + (delete-file orig-file)) + (if signature + (let ((delete-by-moving-to-trash nil)) + (delete-file signature))) (pgg-process-when-success (goto-char (point-min)) (let ((case-fold-search t)) @@ -248,7 +252,8 @@ passphrase cache or user." (let ((coding-system-for-write 'raw-text-dos)) (write-region start end key-file)) (pgg-pgp-process-region start end nil pgg-pgp-program args) - (delete-file key-file) + (let ((delete-by-moving-to-trash nil)) + (delete-file key-file)) (pgg-process-when-success nil))) (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>\"." (if (and process (eq 'run (process-status process))) (interrupt-process process)) (condition-case nil - (delete-file errors-file-name) + (let ((delete-by-moving-to-trash nil)) + (delete-file errors-file-name)) (file-error nil))))) (defun pgg-pgp5-lookup-key (string &optional type) @@ -219,8 +220,11 @@ Bourne shell or its equivalent \(not tcsh) is needed for \"2>\"." (copy-file signature (setq signature (concat orig-file ".asc"))) (setq args (append args (list signature)))) (pgg-pgp5-process-region (point)(point) nil pgg-pgp5-pgpv-program args) - (delete-file orig-file) - (if signature (delete-file signature)) + (let ((delete-by-moving-to-trash nil)) + (delete-file orig-file)) + (if signature + (let ((delete-by-moving-to-trash nil)) + (delete-file signature))) (with-current-buffer pgg-errors-buffer (goto-char (point-min)) (if (re-search-forward "^Good signature" nil t) @@ -249,7 +253,8 @@ Bourne shell or its equivalent \(not tcsh) is needed for \"2>\"." (let ((coding-system-for-write 'raw-text-dos)) (write-region start end key-file)) (pgg-pgp5-process-region start end nil pgg-pgp5-pgpk-program args) - (delete-file key-file) + (let ((delete-by-moving-to-trash nil)) + (delete-file key-file)) (pgg-process-when-success nil))) (provide 'pgg-pgp5) |