]> code.delx.au - gnu-emacs/commitdiff
Bind delete-by-moving-to-trash to nil in EPA and EPG.
authorChong Yidong <cyd@stupidchicken.com>
Sat, 12 Feb 2011 00:21:25 +0000 (19:21 -0500)
committerChong Yidong <cyd@stupidchicken.com>
Sat, 12 Feb 2011 00:21:25 +0000 (19:21 -0500)
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.

lisp/ChangeLog
lisp/epa-file.el
lisp/epg.el

index 852a73735f6031d8c6ea46a242bc1c5e788be398..ec28bbb1eafbdcf7dde0f2757909bc9a24d3b105 100644 (file)
@@ -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)
index 6c577448512a3a2c664744e9790b858385b87fd7..c5c43a724e8c5549508084e35a012718d4d06525 100644 (file)
@@ -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)
 
index 673109b20150ad8c9ba2a832c0ab19cb0c5460e8..3bda4502a7fdabca7d77a9854e0232deca781623 100644 (file)
@@ -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)