# HG changeset patch # User Glenn Morris # Date 1221946114 0 # Node ID 7d8f4fcd876cbb5f39187fd71b77ce21082cccf4 # Parent e3ddbeb0a61f04951661825d9502dd67cc18fe04 David De La Harpe Golden (move-file-to-trash): Avoid recursive trashing if rename-file calls delete-file. diff -r e3ddbeb0a61f -r 7d8f4fcd876c lisp/files.el --- a/lisp/files.el Sat Sep 20 21:14:57 2008 +0000 +++ b/lisp/files.el Sat Sep 20 21:28:34 2008 +0000 @@ -5828,7 +5828,8 @@ (and (string-match fn trash-dir) (error "Filename `%s' is same or parent directory of trash-directory" filename)) - (rename-file fn new-fn))))) + (let ((delete-by-moving-to-trash nil)) + (rename-file fn new-fn)))))) (define-key ctl-x-map "\C-f" 'find-file)