summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChong Yidong <cyd@stupidchicken.com>2011-02-11 19:21:25 -0500
committerChong Yidong <cyd@stupidchicken.com>2011-02-11 19:21:25 -0500
commit4d46072b29fa32b9d5823135900f86a884c56e2f (patch)
tree6fbd4e0a0f9d4740af5acf579140a28cfe022370
parent43e9202446ae7e637ee1c36994717a48e08e07d1 (diff)
downloademacs-4d46072b29fa32b9d5823135900f86a884c56e2f.tar.gz
Bind delete-by-moving-to-trash to nil in EPA and EPG.
This should not be merged into the trunk. * epa-file.el (epa-file-insert-file-contents): Likewise. * epg.el (epg-delete-output-file, epg-decrypt-string) (epg-verify-string, epg-sign-string, epg-encrypt-string): Bind delete-by-moving-to-trash to nil.
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/epa-file.el3
-rw-r--r--lisp/epg.el18
3 files changed, 22 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 852a73735f6..ec28bbb1eaf 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
+2011-02-12 Chong Yidong <cyd@stupidchicken.com>
+
+ * epg.el (epg-delete-output-file, epg-decrypt-string)
+ (epg-verify-string, epg-sign-string, epg-encrypt-string): Bind
+ delete-by-moving-to-trash to nil.
+
+ * epa-file.el (epa-file-insert-file-contents): Likewise.
+
2011-02-10 Glenn Morris <rgm@gnu.org>
* emacs-lisp/cl-seq.el (union, nunion, intersection)
diff --git a/lisp/epa-file.el b/lisp/epa-file.el
index 6c577448512..c5c43a724e8 100644
--- a/lisp/epa-file.el
+++ b/lisp/epa-file.el
@@ -149,7 +149,8 @@ way."
(set-visited-file-modtime))))
(if (and local-copy
(file-exists-p local-copy))
- (delete-file local-copy)))
+ (let ((delete-by-moving-to-trash nil))
+ (delete-file local-copy))))
(list file length)))
(put 'insert-file-contents 'epa-file 'epa-file-insert-file-contents)
diff --git a/lisp/epg.el b/lisp/epg.el
index 673109b2015..3bda4502a7f 100644
--- a/lisp/epg.el
+++ b/lisp/epg.el
@@ -1215,7 +1215,8 @@ This function is for internal use only."
"Delete the output file of CONTEXT."
(if (and (epg-context-output-file context)
(file-exists-p (epg-context-output-file context)))
- (delete-file (epg-context-output-file context))))
+ (let ((delete-by-moving-to-trash nil))
+ (delete-file (epg-context-output-file context)))))
(eval-and-compile
(if (fboundp 'decode-coding-string)
@@ -1904,7 +1905,8 @@ You can then use `write-region' to write new data into the file."
;; Cleanup the tempfile.
(and tempfile
(file-exists-p tempfile)
- (delete-file tempfile))
+ (let ((delete-by-moving-to-trash nil))
+ (delete-file tempfile)))
;; Cleanup the tempdir.
(and tempdir
(file-directory-p tempdir)
@@ -2004,7 +2006,8 @@ If PLAIN is nil, it returns the result as a string."
(epg-read-output context))
(epg-delete-output-file context)
(if (file-exists-p input-file)
- (delete-file input-file))
+ (let ((delete-by-moving-to-trash nil))
+ (delete-file input-file)))
(epg-reset context))))
(defun epg-start-verify (context signature &optional signed-text)
@@ -2101,7 +2104,8 @@ successful verification."
(epg-delete-output-file context)
(if (and input-file
(file-exists-p input-file))
- (delete-file input-file))
+ (let ((delete-by-moving-to-trash nil))
+ (delete-file input-file)))
(epg-reset context))))
(defun epg-start-sign (context plain &optional mode)
@@ -2208,7 +2212,8 @@ Otherwise, it makes a cleartext signature."
(epg-read-output context))
(epg-delete-output-file context)
(if input-file
- (delete-file input-file))
+ (let ((delete-by-moving-to-trash nil))
+ (delete-file input-file)))
(epg-reset context))))
(defun epg-start-encrypt (context plain recipients
@@ -2328,7 +2333,8 @@ If RECIPIENTS is nil, it performs symmetric encryption."
(epg-read-output context))
(epg-delete-output-file context)
(if input-file
- (delete-file input-file))
+ (let ((delete-by-moving-to-trash nil))
+ (delete-file input-file)))
(epg-reset context))))
(defun epg-start-export-keys (context keys)