aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2011-02-11 19:21:25 -0500
committerChong Yidong2011-02-11 19:21:25 -0500
commit4d46072b29fa32b9d5823135900f86a884c56e2f (patch)
tree6fbd4e0a0f9d4740af5acf579140a28cfe022370
parent43e9202446ae7e637ee1c36994717a48e08e07d1 (diff)
downloademacs-4d46072b29fa32b9d5823135900f86a884c56e2f.tar.gz
emacs-4d46072b29fa32b9d5823135900f86a884c56e2f.zip
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 @@
12011-02-12 Chong Yidong <cyd@stupidchicken.com>
2
3 * epg.el (epg-delete-output-file, epg-decrypt-string)
4 (epg-verify-string, epg-sign-string, epg-encrypt-string): Bind
5 delete-by-moving-to-trash to nil.
6
7 * epa-file.el (epa-file-insert-file-contents): Likewise.
8
12011-02-10 Glenn Morris <rgm@gnu.org> 92011-02-10 Glenn Morris <rgm@gnu.org>
2 10
3 * emacs-lisp/cl-seq.el (union, nunion, intersection) 11 * 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."
149 (set-visited-file-modtime)))) 149 (set-visited-file-modtime))))
150 (if (and local-copy 150 (if (and local-copy
151 (file-exists-p local-copy)) 151 (file-exists-p local-copy))
152 (delete-file local-copy))) 152 (let ((delete-by-moving-to-trash nil))
153 (delete-file local-copy))))
153 (list file length))) 154 (list file length)))
154(put 'insert-file-contents 'epa-file 'epa-file-insert-file-contents) 155(put 'insert-file-contents 'epa-file 'epa-file-insert-file-contents)
155 156
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."
1215 "Delete the output file of CONTEXT." 1215 "Delete the output file of CONTEXT."
1216 (if (and (epg-context-output-file context) 1216 (if (and (epg-context-output-file context)
1217 (file-exists-p (epg-context-output-file context))) 1217 (file-exists-p (epg-context-output-file context)))
1218 (delete-file (epg-context-output-file context)))) 1218 (let ((delete-by-moving-to-trash nil))
1219 (delete-file (epg-context-output-file context)))))
1219 1220
1220(eval-and-compile 1221(eval-and-compile
1221 (if (fboundp 'decode-coding-string) 1222 (if (fboundp 'decode-coding-string)
@@ -1904,7 +1905,8 @@ You can then use `write-region' to write new data into the file."
1904 ;; Cleanup the tempfile. 1905 ;; Cleanup the tempfile.
1905 (and tempfile 1906 (and tempfile
1906 (file-exists-p tempfile) 1907 (file-exists-p tempfile)
1907 (delete-file tempfile)) 1908 (let ((delete-by-moving-to-trash nil))
1909 (delete-file tempfile)))
1908 ;; Cleanup the tempdir. 1910 ;; Cleanup the tempdir.
1909 (and tempdir 1911 (and tempdir
1910 (file-directory-p tempdir) 1912 (file-directory-p tempdir)
@@ -2004,7 +2006,8 @@ If PLAIN is nil, it returns the result as a string."
2004 (epg-read-output context)) 2006 (epg-read-output context))
2005 (epg-delete-output-file context) 2007 (epg-delete-output-file context)
2006 (if (file-exists-p input-file) 2008 (if (file-exists-p input-file)
2007 (delete-file input-file)) 2009 (let ((delete-by-moving-to-trash nil))
2010 (delete-file input-file)))
2008 (epg-reset context)))) 2011 (epg-reset context))))
2009 2012
2010(defun epg-start-verify (context signature &optional signed-text) 2013(defun epg-start-verify (context signature &optional signed-text)
@@ -2101,7 +2104,8 @@ successful verification."
2101 (epg-delete-output-file context) 2104 (epg-delete-output-file context)
2102 (if (and input-file 2105 (if (and input-file
2103 (file-exists-p input-file)) 2106 (file-exists-p input-file))
2104 (delete-file input-file)) 2107 (let ((delete-by-moving-to-trash nil))
2108 (delete-file input-file)))
2105 (epg-reset context)))) 2109 (epg-reset context))))
2106 2110
2107(defun epg-start-sign (context plain &optional mode) 2111(defun epg-start-sign (context plain &optional mode)
@@ -2208,7 +2212,8 @@ Otherwise, it makes a cleartext signature."
2208 (epg-read-output context)) 2212 (epg-read-output context))
2209 (epg-delete-output-file context) 2213 (epg-delete-output-file context)
2210 (if input-file 2214 (if input-file
2211 (delete-file input-file)) 2215 (let ((delete-by-moving-to-trash nil))
2216 (delete-file input-file)))
2212 (epg-reset context)))) 2217 (epg-reset context))))
2213 2218
2214(defun epg-start-encrypt (context plain recipients 2219(defun epg-start-encrypt (context plain recipients
@@ -2328,7 +2333,8 @@ If RECIPIENTS is nil, it performs symmetric encryption."
2328 (epg-read-output context)) 2333 (epg-read-output context))
2329 (epg-delete-output-file context) 2334 (epg-delete-output-file context)
2330 (if input-file 2335 (if input-file
2331 (delete-file input-file)) 2336 (let ((delete-by-moving-to-trash nil))
2337 (delete-file input-file)))
2332 (epg-reset context)))) 2338 (epg-reset context))))
2333 2339
2334(defun epg-start-export-keys (context keys) 2340(defun epg-start-export-keys (context keys)