aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorKenichi Handa2010-05-28 15:45:43 +0900
committerKenichi Handa2010-05-28 15:45:43 +0900
commit0ad1627dbeb2c525a78252de500cb92ac367d8e2 (patch)
tree9f66c2446d818199288ec6424ecc88c51418bca7 /lisp
parent7d56b2ddfe092d1c25b6faf3f5688bb85fb46549 (diff)
parent3d338b4613c47aecc773093f92cf48f279ed95d1 (diff)
downloademacs-0ad1627dbeb2c525a78252de500cb92ac367d8e2.tar.gz
emacs-0ad1627dbeb2c525a78252de500cb92ac367d8e2.zip
merge trunk
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog77
-rw-r--r--lisp/diff.el4
-rw-r--r--lisp/dired.el39
-rw-r--r--lisp/epg.el8
-rw-r--r--lisp/files.el33
-rw-r--r--lisp/htmlfontify.el15
-rw-r--r--lisp/jka-compr.el6
-rw-r--r--lisp/net/ange-ftp.el21
-rw-r--r--lisp/net/tramp-compat.el27
-rw-r--r--lisp/net/tramp-fish.el18
-rw-r--r--lisp/net/tramp-ftp.el2
-rw-r--r--lisp/net/tramp-gvfs.el6
-rw-r--r--lisp/net/tramp-imap.el4
-rw-r--r--lisp/net/tramp-smb.el14
-rw-r--r--lisp/net/tramp.el39
-rw-r--r--lisp/progmodes/verilog-mode.el6
-rw-r--r--lisp/server.el2
-rw-r--r--lisp/speedbar.el4
18 files changed, 215 insertions, 110 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 10cd04ec60d..bc80b4cafe0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,80 @@
12010-05-27 Chong Yidong <cyd@stupidchicken.com>
2
3 * dired.el (dired-delete-file): New arg TRASH.
4 (dired-internal-do-deletions): New arg TRASH. Use progress
5 reporter.
6 (dired-do-flagged-delete, dired-do-delete): Use trash.
7
8 * speedbar.el (speedbar-item-delete): Allow trashing.
9
10 * files.el (delete-directory): New arg TRASH.
11
12 * net/ange-ftp.el (ange-ftp-del-tmp-name, ange-ftp-delete-file)
13 (ange-ftp-rename-remote-to-remote)
14 (ange-ftp-rename-local-to-remote)
15 (ange-ftp-rename-remote-to-local, ange-ftp-load)
16 (ange-ftp-compress, ange-ftp-uncompress): Remove optional arg from
17 `delete-file'.
18 (ange-ftp-delete-directory): Add optional arg to `delete-file', to
19 allow trashing.
20
21 * net/tramp-compat.el (tramp-compat-delete-file): Rewrite to
22 handle new TRASH arg of `delete-file'.
23
24 * net/tramp.el (tramp-handle-delete-file): Change FORCE arg to
25 TRASH.
26 (tramp-handle-make-symbolic-link, tramp-handle-load)
27 (tramp-do-copy-or-rename-file-via-buffer)
28 (tramp-do-copy-or-rename-file-directly)
29 (tramp-do-copy-or-rename-file-out-of-band)
30 (tramp-handle-process-file, tramp-handle-call-process-region)
31 (tramp-handle-shell-command, tramp-handle-file-local-copy)
32 (tramp-handle-insert-file-contents, tramp-handle-write-region)
33 (tramp-delete-temp-file-function): Use null TRASH arg in
34 tramp-compat-delete-file call.
35
36 * net/tramp-fish.el (tramp-fish-handle-delete-directory)
37 (tramp-fish-handle-delete-file)
38 (tramp-fish-handle-make-symbolic-link)
39 (tramp-fish-handle-process-file): Use null TRASH arg in
40 `tramp-compat-delete-file' call.
41
42 * net/tramp-ftp.el (tramp-ftp-file-name-handler): Use null TRASH
43 arg in `tramp-compat-delete-file' call.
44
45 * net/tramp-gvfs.el (tramp-gvfs-handle-delete-file): Rename arg.
46 (tramp-gvfs-handle-write-region): Use null TRASH arg in
47 `tramp-compat-delete-file' call.
48
49 * net/tramp-imap.el (tramp-imap-handle-delete-file): Rename arg.
50 (tramp-imap-do-copy-or-rename-file): Use null TRASH arg in
51 `tramp-compat-delete-file' call.
52
53 * net/tramp-smb.el (tramp-smb-handle-copy-file)
54 (tramp-smb-handle-file-local-copy, tramp-smb-handle-rename-file)
55 (tramp-smb-handle-write-region): Use null TRASH arg in
56 tramp-compat-delete-file call.
57 (tramp-smb-handle-delete-directory): Use tramp-compat-delete-file.
58 (tramp-smb-handle-delete-file): Rename arg.
59
60 * diff.el (diff-sentinel):
61 * epg.el (epg--make-temp-file, epg-decrypt-string)
62 (epg-verify-string, epg-sign-string, epg-encrypt-string):
63 * jka-compr.el (jka-compr-partial-uncompress)
64 (jka-compr-call-process, jka-compr-write-region):
65 * server.el (server-sentinel): Remove optional arg from
66 delete-file, reverting 2010-05-03 change.
67
682010-05-27 Chong Yidong <cyd@stupidchicken.com>
69
70 * progmodes/verilog-mode.el (verilog-type-font-keywords): Use
71 font-lock-constant-face, not obsolete font-lock-reference-face.
72
732010-05-27 Masatake YAMATO <yamato@redhat.com>
74
75 * htmlfontify.el (hfy-face-resolve-face): New function.
76 (hfy-face-to-style): Use it (Bug#6279).
77
12010-05-27 Kenichi Handa <handa@m17n.org> 782010-05-27 Kenichi Handa <handa@m17n.org>
2 79
3 * language/hebrew.el (hebrew-shape-gstring): Check if a glyph 80 * language/hebrew.el (hebrew-shape-gstring): Check if a glyph
diff --git a/lisp/diff.el b/lisp/diff.el
index d7fc993ec33..0206c17e770 100644
--- a/lisp/diff.el
+++ b/lisp/diff.el
@@ -64,8 +64,8 @@
64 "Code run when the diff process exits. 64 "Code run when the diff process exits.
65CODE is the exit code of the process. It should be 0 only if no diffs 65CODE is the exit code of the process. It should be 0 only if no diffs
66were found." 66were found."
67 (if diff-old-temp-file (delete-file diff-old-temp-file t)) 67 (if diff-old-temp-file (delete-file diff-old-temp-file))
68 (if diff-new-temp-file (delete-file diff-new-temp-file t)) 68 (if diff-new-temp-file (delete-file diff-new-temp-file))
69 (save-excursion 69 (save-excursion
70 (goto-char (point-max)) 70 (goto-char (point-max))
71 (let ((inhibit-read-only t)) 71 (let ((inhibit-read-only t))
diff --git a/lisp/dired.el b/lisp/dired.el
index 531f329b26a..4fe804dd46d 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -2579,7 +2579,7 @@ Anything else means ask for each directory."
2579;; Delete file, possibly delete a directory and all its files. 2579;; Delete file, possibly delete a directory and all its files.
2580;; This function is usefull outside of dired. One could change it's name 2580;; This function is usefull outside of dired. One could change it's name
2581;; to e.g. recursive-delete-file and put it somewhere else. 2581;; to e.g. recursive-delete-file and put it somewhere else.
2582(defun dired-delete-file (file &optional recursive) "\ 2582(defun dired-delete-file (file &optional recursive trash) "\
2583Delete FILE or directory (possibly recursively if optional RECURSIVE is true.) 2583Delete FILE or directory (possibly recursively if optional RECURSIVE is true.)
2584RECURSIVE determines what to do with a non-empty directory. If RECURSIVE is: 2584RECURSIVE determines what to do with a non-empty directory. If RECURSIVE is:
2585nil, do not delete. 2585nil, do not delete.
@@ -2590,15 +2590,19 @@ Anything else, ask for each sub-directory."
2590 ;; (and (file-directory-p fn) (not (file-symlink-p fn))) 2590 ;; (and (file-directory-p fn) (not (file-symlink-p fn)))
2591 ;; but more efficient 2591 ;; but more efficient
2592 (if (not (eq t (car (file-attributes file)))) 2592 (if (not (eq t (car (file-attributes file))))
2593 (delete-file file) 2593 (delete-file file trash)
2594 (if (and recursive 2594 (if (and recursive
2595 (directory-files file t dired-re-no-dot) ; Not empty. 2595 (directory-files file t dired-re-no-dot) ; Not empty.
2596 (or (eq recursive 'always) 2596 (or (eq recursive 'always)
2597 (yes-or-no-p (format "Recursive delete of %s? " 2597 (yes-or-no-p (format "Recursively %s %s? "
2598 (if (and trash
2599 delete-by-moving-to-trash)
2600 "trash"
2601 "delete")
2598 (dired-make-relative file))))) 2602 (dired-make-relative file)))))
2599 (if (eq recursive 'top) (setq recursive 'always)) ; Don't ask again. 2603 (if (eq recursive 'top) (setq recursive 'always)) ; Don't ask again.
2600 (setq recursive nil)) 2604 (setq recursive nil))
2601 (delete-directory file recursive))) 2605 (delete-directory file recursive trash)))
2602 2606
2603(defun dired-do-flagged-delete (&optional nomessage) 2607(defun dired-do-flagged-delete (&optional nomessage)
2604 "In Dired, delete the files flagged for deletion. 2608 "In Dired, delete the files flagged for deletion.
@@ -2616,7 +2620,7 @@ non-empty directories is allowed."
2616 ;; this can't move point since ARG is nil 2620 ;; this can't move point since ARG is nil
2617 (dired-map-over-marks (cons (dired-get-filename) (point)) 2621 (dired-map-over-marks (cons (dired-get-filename) (point))
2618 nil) 2622 nil)
2619 nil) 2623 nil t)
2620 (or nomessage 2624 (or nomessage
2621 (message "(No deletions requested)"))))) 2625 (message "(No deletions requested)")))))
2622 2626
@@ -2631,11 +2635,11 @@ non-empty directories is allowed."
2631 ;; this may move point if ARG is an integer 2635 ;; this may move point if ARG is an integer
2632 (dired-map-over-marks (cons (dired-get-filename) (point)) 2636 (dired-map-over-marks (cons (dired-get-filename) (point))
2633 arg) 2637 arg)
2634 arg)) 2638 arg t))
2635 2639
2636(defvar dired-deletion-confirmer 'yes-or-no-p) ; or y-or-n-p? 2640(defvar dired-deletion-confirmer 'yes-or-no-p) ; or y-or-n-p?
2637 2641
2638(defun dired-internal-do-deletions (l arg) 2642(defun dired-internal-do-deletions (l arg &optional trash)
2639 ;; L is an alist of files to delete, with their buffer positions. 2643 ;; L is an alist of files to delete, with their buffer positions.
2640 ;; ARG is the prefix arg. 2644 ;; ARG is the prefix arg.
2641 ;; Filenames are absolute. 2645 ;; Filenames are absolute.
@@ -2644,14 +2648,21 @@ non-empty directories is allowed."
2644 ;; lines still to be changed, so the (point) values in L stay valid. 2648 ;; lines still to be changed, so the (point) values in L stay valid.
2645 ;; Also, for subdirs in natural order, a subdir's files are deleted 2649 ;; Also, for subdirs in natural order, a subdir's files are deleted
2646 ;; before the subdir itself - the other way around would not work. 2650 ;; before the subdir itself - the other way around would not work.
2647 (let ((files (mapcar (function car) l)) 2651 (let* ((files (mapcar (function car) l))
2648 (count (length l)) 2652 (count (length l))
2649 (succ 0)) 2653 (succ 0)
2654 (trashing (and trash delete-by-moving-to-trash))
2655 (progress-reporter
2656 (make-progress-reporter
2657 (if trashing "Trashing..." "Deleting...")
2658 succ count)))
2650 ;; canonicalize file list for pop up 2659 ;; canonicalize file list for pop up
2651 (setq files (nreverse (mapcar (function dired-make-relative) files))) 2660 (setq files (nreverse (mapcar (function dired-make-relative) files)))
2652 (if (dired-mark-pop-up 2661 (if (dired-mark-pop-up
2653 " *Deletions*" 'delete files dired-deletion-confirmer 2662 " *Deletions*" 'delete files dired-deletion-confirmer
2654 (format "Delete %s " (dired-mark-prompt arg files))) 2663 (format "%s %s "
2664 (if trashing "Trash" "Delete")
2665 (dired-mark-prompt arg files)))
2655 (save-excursion 2666 (save-excursion
2656 (let (failures);; files better be in reverse order for this loop! 2667 (let (failures);; files better be in reverse order for this loop!
2657 (while l 2668 (while l
@@ -2659,10 +2670,10 @@ non-empty directories is allowed."
2659 (let ((inhibit-read-only t)) 2670 (let ((inhibit-read-only t))
2660 (condition-case err 2671 (condition-case err
2661 (let ((fn (car (car l)))) 2672 (let ((fn (car (car l))))
2662 (dired-delete-file fn dired-recursive-deletes) 2673 (dired-delete-file fn dired-recursive-deletes trash)
2663 ;; if we get here, removing worked 2674 ;; if we get here, removing worked
2664 (setq succ (1+ succ)) 2675 (setq succ (1+ succ))
2665 (message "%s of %s deletions" succ count) 2676 (progress-reporter-update progress-reporter succ)
2666 (dired-fun-in-all-buffers 2677 (dired-fun-in-all-buffers
2667 (file-name-directory fn) (file-name-nondirectory fn) 2678 (file-name-directory fn) (file-name-nondirectory fn)
2668 (function dired-delete-entry) fn)) 2679 (function dired-delete-entry) fn))
@@ -2671,7 +2682,7 @@ non-empty directories is allowed."
2671 (setq failures (cons (car (car l)) failures))))) 2682 (setq failures (cons (car (car l)) failures)))))
2672 (setq l (cdr l))) 2683 (setq l (cdr l)))
2673 (if (not failures) 2684 (if (not failures)
2674 (message "%d deletion%s done" count (dired-plural-s count)) 2685 (progress-reporter-done progress-reporter)
2675 (dired-log-summary 2686 (dired-log-summary
2676 (format "%d of %d deletion%s failed" 2687 (format "%d of %d deletion%s failed"
2677 (length failures) count 2688 (length failures) count
diff --git a/lisp/epg.el b/lisp/epg.el
index 6e69ae09da4..9a75560704a 100644
--- a/lisp/epg.el
+++ b/lisp/epg.el
@@ -1899,7 +1899,7 @@ You can then use `write-region' to write new data into the file."
1899 ;; Cleanup the tempfile. 1899 ;; Cleanup the tempfile.
1900 (and tempfile 1900 (and tempfile
1901 (file-exists-p tempfile) 1901 (file-exists-p tempfile)
1902 (delete-file tempfile t)) 1902 (delete-file tempfile))
1903 ;; Cleanup the tempdir. 1903 ;; Cleanup the tempdir.
1904 (and tempdir 1904 (and tempdir
1905 (file-directory-p tempdir) 1905 (file-directory-p tempdir)
@@ -1999,7 +1999,7 @@ If PLAIN is nil, it returns the result as a string."
1999 (epg-read-output context)) 1999 (epg-read-output context))
2000 (epg-delete-output-file context) 2000 (epg-delete-output-file context)
2001 (if (file-exists-p input-file) 2001 (if (file-exists-p input-file)
2002 (delete-file input-file t)) 2002 (delete-file input-file))
2003 (epg-reset context)))) 2003 (epg-reset context))))
2004 2004
2005(defun epg-start-verify (context signature &optional signed-text) 2005(defun epg-start-verify (context signature &optional signed-text)
@@ -2203,7 +2203,7 @@ Otherwise, it makes a cleartext signature."
2203 (epg-read-output context)) 2203 (epg-read-output context))
2204 (epg-delete-output-file context) 2204 (epg-delete-output-file context)
2205 (if input-file 2205 (if input-file
2206 (delete-file input-file t)) 2206 (delete-file input-file))
2207 (epg-reset context)))) 2207 (epg-reset context))))
2208 2208
2209(defun epg-start-encrypt (context plain recipients 2209(defun epg-start-encrypt (context plain recipients
@@ -2323,7 +2323,7 @@ If RECIPIENTS is nil, it performs symmetric encryption."
2323 (epg-read-output context)) 2323 (epg-read-output context))
2324 (epg-delete-output-file context) 2324 (epg-delete-output-file context)
2325 (if input-file 2325 (if input-file
2326 (delete-file input-file t)) 2326 (delete-file input-file))
2327 (epg-reset context)))) 2327 (epg-reset context))))
2328 2328
2329(defun epg-start-export-keys (context keys) 2329(defun epg-start-export-keys (context keys)
diff --git a/lisp/files.el b/lisp/files.el
index d4c05bdc5d6..4ab583d018b 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -4675,19 +4675,30 @@ this happens by default."
4675 "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*" 4675 "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*"
4676 "Regexp of file names excluging \".\" an \"..\".") 4676 "Regexp of file names excluging \".\" an \"..\".")
4677 4677
4678(defun delete-directory (directory &optional recursive) 4678(defun delete-directory (directory &optional recursive trash)
4679 "Delete the directory named DIRECTORY. Does not follow symlinks. 4679 "Delete the directory named DIRECTORY. Does not follow symlinks.
4680If RECURSIVE is non-nil, all files in DIRECTORY are deleted as well." 4680If RECURSIVE is non-nil, all files in DIRECTORY are deleted as well.
4681TRASH non-nil means to trash the directory instead, provided
4682`delete-by-moving-to-trash' is non-nil.
4683
4684When called interactively, TRASH is t if no prefix argument is
4685given. With a prefix argument, TRASH is nil."
4681 (interactive 4686 (interactive
4682 (let ((dir (expand-file-name 4687 (let* ((trashing (and delete-by-moving-to-trash
4683 (read-file-name 4688 (null current-prefix-arg)))
4684 "Delete directory: " 4689 (dir (expand-file-name
4685 default-directory default-directory nil nil)))) 4690 (read-file-name
4691 (if trashing
4692 "Move directory to trash: "
4693 "Delete directory: ")
4694 default-directory default-directory nil nil))))
4686 (list dir 4695 (list dir
4687 (if (directory-files dir nil directory-files-no-dot-files-regexp) 4696 (if (directory-files dir nil directory-files-no-dot-files-regexp)
4688 (y-or-n-p 4697 (y-or-n-p
4689 (format "Directory `%s' is not empty, really delete? " dir)) 4698 (format "Directory `%s' is not empty, really %s? "
4690 nil)))) 4699 dir (if trashing "trash" "delete")))
4700 nil)
4701 (null current-prefix-arg))))
4691 ;; If default-directory is a remote directory, make sure we find its 4702 ;; If default-directory is a remote directory, make sure we find its
4692 ;; delete-directory handler. 4703 ;; delete-directory handler.
4693 (setq directory (directory-file-name (expand-file-name directory))) 4704 (setq directory (directory-file-name (expand-file-name directory)))
@@ -4695,7 +4706,7 @@ If RECURSIVE is non-nil, all files in DIRECTORY are deleted as well."
4695 (cond 4706 (cond
4696 (handler 4707 (handler
4697 (funcall handler 'delete-directory directory recursive)) 4708 (funcall handler 'delete-directory directory recursive))
4698 (delete-by-moving-to-trash 4709 ((and delete-by-moving-to-trash trash)
4699 ;; Only move non-empty dir to trash if recursive deletion was 4710 ;; Only move non-empty dir to trash if recursive deletion was
4700 ;; requested. This mimics the non-`delete-by-moving-to-trash' 4711 ;; requested. This mimics the non-`delete-by-moving-to-trash'
4701 ;; case, where the operation fails in delete-directory-internal. 4712 ;; case, where the operation fails in delete-directory-internal.
@@ -4715,8 +4726,8 @@ If RECURSIVE is non-nil, all files in DIRECTORY are deleted as well."
4715 ;; (and (file-directory-p fn) (not (file-symlink-p fn))) 4726 ;; (and (file-directory-p fn) (not (file-symlink-p fn)))
4716 ;; but more efficient 4727 ;; but more efficient
4717 (if (eq t (car (file-attributes file))) 4728 (if (eq t (car (file-attributes file)))
4718 (delete-directory file recursive) 4729 (delete-directory file recursive nil)
4719 (delete-file file))) 4730 (delete-file file nil)))
4720 ;; We do not want to delete "." and "..". 4731 ;; We do not want to delete "." and "..".
4721 (directory-files 4732 (directory-files
4722 directory 'full directory-files-no-dot-files-regexp))) 4733 directory 'full directory-files-no-dot-files-regexp)))
diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el
index d4dd49ac17d..12e54972461 100644
--- a/lisp/htmlfontify.el
+++ b/lisp/htmlfontify.el
@@ -1026,14 +1026,25 @@ haven't encountered them yet. Returns a `hfy-style-assoc'."
1026 (setq n (apply '* m)) 1026 (setq n (apply '* m))
1027 (nconc r (hfy-size (if x (round n) (* n 1.0)))) )) 1027 (nconc r (hfy-size (if x (round n) (* n 1.0)))) ))
1028 1028
1029(defun hfy-face-resolve-face (fn)
1030 (cond
1031 ((facep fn)
1032 (hfy-face-attr-for-class fn hfy-display-class))
1033 ((and (symbolp fn)
1034 (facep (symbol-value fn)))
1035 ;; Obsolete faces like `font-lock-reference-face' are defined as
1036 ;; aliases for another face.
1037 (hfy-face-attr-for-class (symbol-value fn) hfy-display-class))
1038 (t nil)))
1039
1040
1029(defun hfy-face-to-style (fn) 1041(defun hfy-face-to-style (fn)
1030 "Take FN, a font or `defface' style font specification, 1042 "Take FN, a font or `defface' style font specification,
1031\(as returned by `face-attr-construct' or `hfy-face-attr-for-class') 1043\(as returned by `face-attr-construct' or `hfy-face-attr-for-class')
1032and return a `hfy-style-assoc'.\n 1044and return a `hfy-style-assoc'.\n
1033See also `hfy-face-to-style-i', `hfy-flatten-style'." 1045See also `hfy-face-to-style-i', `hfy-flatten-style'."
1034 ;;(message "hfy-face-to-style");;DBUG 1046 ;;(message "hfy-face-to-style");;DBUG
1035 (let ((face-def (if (facep fn) 1047 (let ((face-def (hfy-face-resolve-face fn))
1036 (hfy-face-attr-for-class fn hfy-display-class) fn))
1037 (final-style nil)) 1048 (final-style nil))
1038 1049
1039 (setq final-style (hfy-flatten-style (hfy-face-to-style-i face-def))) 1050 (setq final-style (hfy-flatten-style (hfy-face-to-style-i face-def)))
diff --git a/lisp/jka-compr.el b/lisp/jka-compr.el
index e4311e13f28..3f0ff542212 100644
--- a/lisp/jka-compr.el
+++ b/lisp/jka-compr.el
@@ -181,7 +181,7 @@ to keep: LEN chars starting BEG chars from the beginning."
181 null-device)) 181 null-device))
182 jka-compr-acceptable-retval-list) 182 jka-compr-acceptable-retval-list)
183 (jka-compr-error prog args infile message err-file)) 183 (jka-compr-error prog args infile message err-file))
184 (delete-file err-file t))) 184 (delete-file err-file)))
185 185
186 ;; Run the uncompression program directly. 186 ;; Run the uncompression program directly.
187 ;; We get the whole file and must delete what we don't want. 187 ;; We get the whole file and must delete what we don't want.
@@ -223,7 +223,7 @@ to keep: LEN chars starting BEG chars from the beginning."
223 ""))) 223 "")))
224 jka-compr-acceptable-retval-list) 224 jka-compr-acceptable-retval-list)
225 (jka-compr-error prog args infile message err-file)) 225 (jka-compr-error prog args infile message err-file))
226 (delete-file err-file t))) 226 (delete-file err-file)))
227 (or (eq 0 227 (or (eq 0
228 (apply 'call-process 228 (apply 'call-process
229 prog infile (if (stringp output) temp output) 229 prog infile (if (stringp output) temp output)
@@ -335,7 +335,7 @@ There should be no more than seven characters after the final `/'."
335 (and append can-append) 'dont)) 335 (and append can-append) 'dont))
336 (erase-buffer)) ) 336 (erase-buffer)) )
337 337
338 (delete-file temp-file t) 338 (delete-file temp-file)
339 339
340 (and 340 (and
341 compress-message 341 compress-message
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index 73cb2e57bb2..dcc6ddabcdc 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -1736,7 +1736,7 @@ good, skip, fatal, or unknown."
1736 1736
1737(defun ange-ftp-del-tmp-name (filename) 1737(defun ange-ftp-del-tmp-name (filename)
1738 "Force to delete temporary file." 1738 "Force to delete temporary file."
1739 (delete-file filename 'force)) 1739 (delete-file filename))
1740 1740
1741 1741
1742;;;; ------------------------------------------------------------ 1742;;;; ------------------------------------------------------------
@@ -3507,8 +3507,9 @@ system TYPE.")
3507 (file-exists-p file) 3507 (file-exists-p file)
3508 (ange-ftp-real-file-executable-p file)))) 3508 (ange-ftp-real-file-executable-p file))))
3509 3509
3510(defun ange-ftp-delete-file (file &optional force) 3510(defun ange-ftp-delete-file (file &optional trash)
3511 (interactive "fDelete file: ") 3511 (interactive (list (read-file-name "Delete file: " nil default-directory)
3512 (null current-prefix-arg)))
3512 (setq file (expand-file-name file)) 3513 (setq file (expand-file-name file))
3513 (let ((parsed (ange-ftp-ftp-name file))) 3514 (let ((parsed (ange-ftp-ftp-name file)))
3514 (if parsed 3515 (if parsed
@@ -3526,7 +3527,7 @@ system TYPE.")
3526 (format "FTP Error: \"%s\"" (cdr result)) 3527 (format "FTP Error: \"%s\"" (cdr result))
3527 file))) 3528 file)))
3528 (ange-ftp-delete-file-entry file)) 3529 (ange-ftp-delete-file-entry file))
3529 (ange-ftp-real-delete-file file force)))) 3530 (ange-ftp-real-delete-file file trash))))
3530 3531
3531(defun ange-ftp-file-modtime (file) 3532(defun ange-ftp-file-modtime (file)
3532 "Return the modification time of remote file FILE. 3533 "Return the modification time of remote file FILE.
@@ -3897,7 +3898,7 @@ E.g.,
3897 (ange-ftp-add-file-entry newname) 3898 (ange-ftp-add-file-entry newname)
3898 (ange-ftp-delete-file-entry filename)) 3899 (ange-ftp-delete-file-entry filename))
3899 (ange-ftp-copy-file-internal filename newname t nil) 3900 (ange-ftp-copy-file-internal filename newname t nil)
3900 (delete-file filename 'force)))) 3901 (delete-file filename))))
3901 3902
3902(defun ange-ftp-rename-local-to-remote (filename newname) 3903(defun ange-ftp-rename-local-to-remote (filename newname)
3903 "Rename local file FILENAME to remote file NEWNAME." 3904 "Rename local file FILENAME to remote file NEWNAME."
@@ -3906,7 +3907,7 @@ E.g.,
3906 (msg (format "Renaming %s to %s" fabbr nabbr))) 3907 (msg (format "Renaming %s to %s" fabbr nabbr)))
3907 (ange-ftp-copy-file-internal filename newname t nil msg) 3908 (ange-ftp-copy-file-internal filename newname t nil msg)
3908 (let (ange-ftp-process-verbose) 3909 (let (ange-ftp-process-verbose)
3909 (delete-file filename 'force)))) 3910 (delete-file filename))))
3910 3911
3911(defun ange-ftp-rename-remote-to-local (filename newname) 3912(defun ange-ftp-rename-remote-to-local (filename newname)
3912 "Rename remote file FILENAME to local file NEWNAME." 3913 "Rename remote file FILENAME to local file NEWNAME."
@@ -3915,7 +3916,7 @@ E.g.,
3915 (msg (format "Renaming %s to %s" fabbr nabbr))) 3916 (msg (format "Renaming %s to %s" fabbr nabbr)))
3916 (ange-ftp-copy-file-internal filename newname t nil msg) 3917 (ange-ftp-copy-file-internal filename newname t nil msg)
3917 (let (ange-ftp-process-verbose) 3918 (let (ange-ftp-process-verbose)
3918 (delete-file filename 'force)))) 3919 (delete-file filename))))
3919 3920
3920(defun ange-ftp-rename-file (filename newname &optional ok-if-already-exists) 3921(defun ange-ftp-rename-file (filename newname &optional ok-if-already-exists)
3921 (interactive "fRename file: \nFRename %s to file: \np") 3922 (interactive "fRename file: \nFRename %s to file: \np")
@@ -4196,7 +4197,7 @@ directory, so that Emacs will know its current contents."
4196 (if copy 4197 (if copy
4197 (unwind-protect 4198 (unwind-protect
4198 (funcall 'load copy noerror nomessage nosuffix) 4199 (funcall 'load copy noerror nomessage nosuffix)
4199 (delete-file copy 'force)) 4200 (delete-file copy))
4200 (or noerror 4201 (or noerror
4201 (signal 'file-error (list "Cannot open load file" file))) 4202 (signal 'file-error (list "Cannot open load file" file)))
4202 nil)) 4203 nil))
@@ -4267,7 +4268,7 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
4267 (if (zerop (buffer-size)) 4268 (if (zerop (buffer-size))
4268 (progn 4269 (progn
4269 (let (ange-ftp-process-verbose) 4270 (let (ange-ftp-process-verbose)
4270 (delete-file file 'force)) 4271 (delete-file file))
4271 (ange-ftp-copy-file-internal tmp2 nfile t nil msg2)))) 4272 (ange-ftp-copy-file-internal tmp2 nfile t nil msg2))))
4272 (ange-ftp-del-tmp-name tmp1) 4273 (ange-ftp-del-tmp-name tmp1)
4273 (ange-ftp-del-tmp-name tmp2)))) 4274 (ange-ftp-del-tmp-name tmp2))))
@@ -4303,7 +4304,7 @@ NEWNAME should be the name to give the new compressed or uncompressed file.")
4303 (if (zerop (buffer-size)) 4304 (if (zerop (buffer-size))
4304 (progn 4305 (progn
4305 (let (ange-ftp-process-verbose) 4306 (let (ange-ftp-process-verbose)
4306 (delete-file file 'force)) 4307 (delete-file file))
4307 (ange-ftp-copy-file-internal tmp2 nfile t nil msg2)))) 4308 (ange-ftp-copy-file-internal tmp2 nfile t nil msg2))))
4308 (ange-ftp-del-tmp-name tmp1) 4309 (ange-ftp-del-tmp-name tmp1)
4309 (ange-ftp-del-tmp-name tmp2)))) 4310 (ange-ftp-del-tmp-name tmp2))))
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el
index a9c4a478c06..530a8693490 100644
--- a/lisp/net/tramp-compat.el
+++ b/lisp/net/tramp-compat.el
@@ -334,23 +334,18 @@ Add the extension of FILENAME, if existing."
334 (if keep-time 334 (if keep-time
335 (set-file-times newname (nth 5 (file-attributes directory)))))))) 335 (set-file-times newname (nth 5 (file-attributes directory))))))))
336 336
337;; FORCE has been introduced with Emacs 24.1. 337;; TRASH has been introduced with Emacs 24.1.
338(defun tramp-compat-delete-file (filename &optional force) 338(defun tramp-compat-delete-file (filename &optional trash)
339 "Like `delete-file' for Tramp files (compat function)." 339 "Like `delete-file' for Tramp files (compat function)."
340 (if (null force) 340 (condition-case nil
341 (delete-file filename) 341 (tramp-compat-funcall 'delete-file filename trash)
342 (condition-case nil 342 ;; This Emacs version does not support the TRASH flag.
343 (tramp-compat-funcall 'delete-file filename force) 343 (wrong-number-of-arguments
344 ;; This Emacs version does not support the FORCE flag. Setting 344 (let ((delete-by-moving-to-trash
345 ;; `delete-by-moving-to-trash' shall give us the same effect. 345 (and (boundp 'delete-by-moving-to-trash)
346 (wrong-number-of-arguments 346 delete-by-moving-to-trash
347 (let ((delete-by-moving-to-trash 347 trash)))
348 (cond 348 (delete-file filename)))))
349 ((null force) t)
350 ((boundp 'delete-by-moving-to-trash)
351 (symbol-value 'delete-by-moving-to-trash))
352 (t nil))))
353 (delete-file filename))))))
354 349
355;; RECURSIVE has been introduced with Emacs 23.2. 350;; RECURSIVE has been introduced with Emacs 23.2.
356(defun tramp-compat-delete-directory (directory &optional recursive) 351(defun tramp-compat-delete-directory (directory &optional recursive)
diff --git a/lisp/net/tramp-fish.el b/lisp/net/tramp-fish.el
index c7617252288..db5c8ad0b48 100644
--- a/lisp/net/tramp-fish.el
+++ b/lisp/net/tramp-fish.el
@@ -326,16 +326,16 @@ pass to the OPERATION."
326 (lambda (file) 326 (lambda (file)
327 (if (file-directory-p file) 327 (if (file-directory-p file)
328 (tramp-compat-delete-directory file recursive) 328 (tramp-compat-delete-directory file recursive)
329 (delete-file file))) 329 (tramp-compat-delete-file file)))
330 ;; We do not want to delete "." and "..". 330 ;; We do not want to delete "." and "..".
331 (directory-files 331 (directory-files
332 directory 'full "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*"))) 332 directory 'full "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*")))
333 (with-parsed-tramp-file-name 333 (with-parsed-tramp-file-name
334 (directory-file-name (expand-file-name directory)) nil 334 (directory-file-name (expand-file-name directory)) nil
335 (tramp-flush-directory-property v localname) 335 (tramp-flush-directory-property v localname)
336 (tramp-fish-send-command-and-check v (format "#RMD %s" localname))))) 336 (tramp-fish-send-command-and-check v (format "#RMD %s" localname)))))
337 337
338(defun tramp-fish-handle-delete-file (filename &optional force) 338(defun tramp-fish-handle-delete-file (filename &optional trash)
339 "Like `delete-file' for Tramp files." 339 "Like `delete-file' for Tramp files."
340 (when (file-exists-p filename) 340 (when (file-exists-p filename)
341 (with-parsed-tramp-file-name (expand-file-name filename) nil 341 (with-parsed-tramp-file-name (expand-file-name filename) nil
@@ -660,7 +660,7 @@ target of the symlink differ."
660 localname))))) 660 localname)))))
661 (tramp-error 661 (tramp-error
662 v 'file-already-exists "File %s already exists" localname) 662 v 'file-already-exists "File %s already exists" localname)
663 (tramp-compat-delete-file linkname 'force))) 663 (tramp-compat-delete-file linkname)))
664 664
665 ;; If FILENAME is a Tramp name, use just the localname component. 665 ;; If FILENAME is a Tramp name, use just the localname component.
666 (when (tramp-tramp-file-p filename) 666 (when (tramp-tramp-file-p filename)
@@ -839,8 +839,8 @@ target of the symlink differ."
839 ;; Provide error file. 839 ;; Provide error file.
840 (when tmpstderr (rename-file tmpstderr (cadr destination) t)) 840 (when tmpstderr (rename-file tmpstderr (cadr destination) t))
841 ;; Cleanup. 841 ;; Cleanup.
842 (when tmpinput (tramp-compat-delete-file tmpinput 'force)) 842 (when tmpinput (tramp-compat-delete-file tmpinput))
843 (when tmpoutput (tramp-compat-delete-file tmpoutput 'force)) 843 (when tmpoutput (tramp-compat-delete-file tmpoutput))
844 ;; Return exit status. 844 ;; Return exit status.
845 ret))) 845 ret)))
846 846
diff --git a/lisp/net/tramp-ftp.el b/lisp/net/tramp-ftp.el
index 17cd6216c78..ca421cbaaa6 100644
--- a/lisp/net/tramp-ftp.el
+++ b/lisp/net/tramp-ftp.el
@@ -182,7 +182,7 @@ pass to the OPERATION."
182 (unwind-protect 182 (unwind-protect
183 (rename-file tmpfile newname (car args)) 183 (rename-file tmpfile newname (car args))
184 ;; Cleanup. 184 ;; Cleanup.
185 (ignore-errors (tramp-compat-delete-file tmpfile 'force))))) 185 (ignore-errors (tramp-compat-delete-file tmpfile)))))
186 186
187 ;; Normally, the handlers must be discarded. 187 ;; Normally, the handlers must be discarded.
188 ;; `inhibit-file-name-handlers' isn't sufficient, because the 188 ;; `inhibit-file-name-handlers' isn't sufficient, because the
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index 2cad20e4cfb..25dae77544d 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -533,9 +533,9 @@ is no information where to trace the message.")
533 (tramp-compat-delete-directory 533 (tramp-compat-delete-directory
534 (tramp-gvfs-fuse-file-name directory) recursive)) 534 (tramp-gvfs-fuse-file-name directory) recursive))
535 535
536(defun tramp-gvfs-handle-delete-file (filename &optional force) 536(defun tramp-gvfs-handle-delete-file (filename &optional tramp)
537 "Like `delete-file' for Tramp files." 537 "Like `delete-file' for Tramp files."
538 (tramp-compat-delete-file (tramp-gvfs-fuse-file-name filename) force)) 538 (tramp-compat-delete-file (tramp-gvfs-fuse-file-name filename) tramp))
539 539
540(defun tramp-gvfs-handle-directory-files 540(defun tramp-gvfs-handle-directory-files
541 (directory &optional full match nosort) 541 (directory &optional full match nosort)
@@ -742,7 +742,7 @@ is no information where to trace the message.")
742 "gvfs-save" tmpfile (tramp-get-buffer v) nil 742 "gvfs-save" tmpfile (tramp-get-buffer v) nil
743 (tramp-gvfs-url-file-name filename))) 743 (tramp-gvfs-url-file-name filename)))
744 (signal (car err) (cdr err))) 744 (signal (car err) (cdr err)))
745 (tramp-compat-delete-file tmpfile 'force))))) 745 (tramp-compat-delete-file tmpfile)))))
746 746
747 ;; Set file modification time. 747 ;; Set file modification time.
748 (when (or (eq visit t) (stringp visit)) 748 (when (or (eq visit t) (stringp visit))
diff --git a/lisp/net/tramp-imap.el b/lisp/net/tramp-imap.el
index e1e91365792..de8e58e7491 100644
--- a/lisp/net/tramp-imap.el
+++ b/lisp/net/tramp-imap.el
@@ -268,7 +268,7 @@ of `copy' and `rename'."
268 (write-region (point-min) (point-max) newname))))) 268 (write-region (point-min) (point-max) newname)))))
269 269
270 (when (eq op 'rename) 270 (when (eq op 'rename)
271 (tramp-compat-delete-file filename 'force)))) 271 (tramp-compat-delete-file filename))))
272 272
273;; TODO: revise this much 273;; TODO: revise this much
274(defun tramp-imap-handle-expand-file-name (name &optional dir) 274(defun tramp-imap-handle-expand-file-name (name &optional dir)
@@ -552,7 +552,7 @@ SIZE MODE WEIRD INODE DEVICE)."
552 ;; (file-exists-p (file-name-directory filename))) 552 ;; (file-exists-p (file-name-directory filename)))
553 (file-directory-p (file-name-directory filename))) 553 (file-directory-p (file-name-directory filename)))
554 554
555(defun tramp-imap-handle-delete-file (filename &optional force) 555(defun tramp-imap-handle-delete-file (filename &optional trash)
556 "Like `delete-file' for Tramp files." 556 "Like `delete-file' for Tramp files."
557 (cond 557 (cond
558 ((not (file-exists-p filename)) nil) 558 ((not (file-exists-p filename)) nil)
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index 00b282b83e3..54cccb49053 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -345,7 +345,7 @@ PRESERVE-UID-GID is completely ignored."
345 (condition-case err 345 (condition-case err
346 (rename-file tmpfile newname ok-if-already-exists) 346 (rename-file tmpfile newname ok-if-already-exists)
347 ((error quit) 347 ((error quit)
348 (tramp-compat-delete-file tmpfile 'force) 348 (tramp-compat-delete-file tmpfile)
349 (signal (car err) (cdr err)))) 349 (signal (car err) (cdr err))))
350 350
351 ;; Remote newname. 351 ;; Remote newname.
@@ -382,7 +382,7 @@ PRESERVE-UID-GID is completely ignored."
382 (lambda (file) 382 (lambda (file)
383 (if (file-directory-p file) 383 (if (file-directory-p file)
384 (tramp-compat-delete-directory file recursive) 384 (tramp-compat-delete-directory file recursive)
385 (delete-file file))) 385 (tramp-compat-delete-file file t)))
386 ;; We do not want to delete "." and "..". 386 ;; We do not want to delete "." and "..".
387 (directory-files 387 (directory-files
388 directory 'full "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*"))) 388 directory 'full "^\\([^.]\\|\\.\\([^.]\\|\\..\\)\\).*")))
@@ -404,7 +404,7 @@ PRESERVE-UID-GID is completely ignored."
404 (tramp-error 404 (tramp-error
405 v 'file-error "%s `%s'" (match-string 0) directory)))))) 405 v 'file-error "%s `%s'" (match-string 0) directory))))))
406 406
407(defun tramp-smb-handle-delete-file (filename &optional force) 407(defun tramp-smb-handle-delete-file (filename &optional trash)
408 "Like `delete-file' for Tramp files." 408 "Like `delete-file' for Tramp files."
409 (setq filename (expand-file-name filename)) 409 (setq filename (expand-file-name filename))
410 (when (file-exists-p filename) 410 (when (file-exists-p filename)
@@ -611,7 +611,7 @@ PRESERVE-UID-GID is completely ignored."
611 v (format "get \"%s\" \"%s\"" 611 v (format "get \"%s\" \"%s\""
612 (tramp-smb-get-localname v) tmpfile)) 612 (tramp-smb-get-localname v) tmpfile))
613 ;; Oops, an error. We shall cleanup. 613 ;; Oops, an error. We shall cleanup.
614 (tramp-compat-delete-file tmpfile 'force) 614 (tramp-compat-delete-file tmpfile)
615 (tramp-error 615 (tramp-error
616 v 'file-error "Cannot make local copy of file `%s'" filename))) 616 v 'file-error "Cannot make local copy of file `%s'" filename)))
617 tmpfile))) 617 tmpfile)))
@@ -861,7 +861,7 @@ target of the symlink differ."
861 (condition-case err 861 (condition-case err
862 (rename-file tmpfile newname ok-if-already-exists) 862 (rename-file tmpfile newname ok-if-already-exists)
863 ((error quit) 863 ((error quit)
864 (tramp-compat-delete-file tmpfile 'force) 864 (tramp-compat-delete-file tmpfile)
865 (signal (car err) (cdr err)))) 865 (signal (car err) (cdr err))))
866 866
867 ;; Remote newname. 867 ;; Remote newname.
@@ -882,7 +882,7 @@ target of the symlink differ."
882 filename (tramp-smb-get-localname v))) 882 filename (tramp-smb-get-localname v)))
883 (tramp-error v 'file-error "Cannot rename `%s'" filename))))) 883 (tramp-error v 'file-error "Cannot rename `%s'" filename)))))
884 884
885 (tramp-compat-delete-file filename 'force))) 885 (tramp-compat-delete-file filename)))
886 886
887(defun tramp-smb-handle-set-file-modes (filename mode) 887(defun tramp-smb-handle-set-file-modes (filename mode)
888 "Like `set-file-modes' for Tramp files." 888 "Like `set-file-modes' for Tramp files."
@@ -946,7 +946,7 @@ errors for shares like \"C$/\", which are common in Microsoft Windows."
946 v (format "put %s \"%s\"" 946 v (format "put %s \"%s\""
947 tmpfile (tramp-smb-get-localname v))) 947 tmpfile (tramp-smb-get-localname v)))
948 (tramp-error v 'file-error "Cannot write `%s'" filename)) 948 (tramp-error v 'file-error "Cannot write `%s'" filename))
949 (tramp-compat-delete-file tmpfile 'force))) 949 (tramp-compat-delete-file tmpfile)))
950 950
951 (unless (equal curbuf (current-buffer)) 951 (unless (equal curbuf (current-buffer))
952 (tramp-error 952 (tramp-error
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 91b35481730..a1aed599ae9 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -2544,7 +2544,7 @@ target of the symlink differ."
2544 l-localname))))) 2544 l-localname)))))
2545 (tramp-error 2545 (tramp-error
2546 l 'file-already-exists "File %s already exists" l-localname) 2546 l 'file-already-exists "File %s already exists" l-localname)
2547 (tramp-compat-delete-file linkname 'force))) 2547 (tramp-compat-delete-file linkname)))
2548 2548
2549 ;; If FILENAME is a Tramp name, use just the localname component. 2549 ;; If FILENAME is a Tramp name, use just the localname component.
2550 (when (tramp-tramp-file-p filename) 2550 (when (tramp-tramp-file-p filename)
@@ -2593,7 +2593,7 @@ target of the symlink differ."
2593 ;; MUST-SUFFIX doesn't exist on XEmacs, so let it default to nil. 2593 ;; MUST-SUFFIX doesn't exist on XEmacs, so let it default to nil.
2594 (unwind-protect 2594 (unwind-protect
2595 (load local-copy noerror t t) 2595 (load local-copy noerror t t)
2596 (tramp-compat-delete-file local-copy 'force))))) 2596 (tramp-compat-delete-file local-copy)))))
2597 t))) 2597 t)))
2598 2598
2599;; Localname manipulation functions that grok Tramp localnames... 2599;; Localname manipulation functions that grok Tramp localnames...
@@ -3769,7 +3769,7 @@ KEEP-DATE is non-nil if NEWNAME should have the same timestamp as FILENAME."
3769 ;; Set the mode. 3769 ;; Set the mode.
3770 (set-file-modes newname (tramp-default-file-modes filename)) 3770 (set-file-modes newname (tramp-default-file-modes filename))
3771 ;; If the operation was `rename', delete the original file. 3771 ;; If the operation was `rename', delete the original file.
3772 (unless (eq op 'copy) (tramp-compat-delete-file filename 'force))) 3772 (unless (eq op 'copy) (tramp-compat-delete-file filename)))
3773 3773
3774(defun tramp-do-copy-or-rename-file-directly 3774(defun tramp-do-copy-or-rename-file-directly
3775 (op filename newname ok-if-already-exists keep-date preserve-uid-gid) 3775 (op filename newname ok-if-already-exists keep-date preserve-uid-gid)
@@ -3924,7 +3924,7 @@ the uid and gid from FILENAME."
3924 3924
3925 ;; Save exit. 3925 ;; Save exit.
3926 (condition-case nil 3926 (condition-case nil
3927 (tramp-compat-delete-file tmpfile 'force) 3927 (tramp-compat-delete-file tmpfile)
3928 (error))))))))) 3928 (error)))))))))
3929 3929
3930 ;; Set the time and mode. Mask possible errors. 3930 ;; Set the time and mode. Mask possible errors.
@@ -3964,7 +3964,7 @@ The method used must be an out-of-band method."
3964 (if dir-flag 3964 (if dir-flag
3965 (tramp-compat-delete-directory 3965 (tramp-compat-delete-directory
3966 (expand-file-name ".." tmpfile) 'recursive) 3966 (expand-file-name ".." tmpfile) 'recursive)
3967 (tramp-compat-delete-file tmpfile 'force)) 3967 (tramp-compat-delete-file tmpfile))
3968 (error)))) 3968 (error))))
3969 3969
3970 ;; Expand hops. Might be necessary for gateway methods. 3970 ;; Expand hops. Might be necessary for gateway methods.
@@ -4082,7 +4082,7 @@ The method used must be an out-of-band method."
4082 ;; If the operation was `rename', delete the original file. 4082 ;; If the operation was `rename', delete the original file.
4083 (unless (eq op 'copy) 4083 (unless (eq op 'copy)
4084 (if (file-regular-p filename) 4084 (if (file-regular-p filename)
4085 (tramp-compat-delete-file filename 'force) 4085 (tramp-compat-delete-file filename)
4086 (tramp-compat-delete-directory filename 'recursive)))))) 4086 (tramp-compat-delete-directory filename 'recursive))))))
4087 4087
4088(defun tramp-handle-make-directory (dir &optional parents) 4088(defun tramp-handle-make-directory (dir &optional parents)
@@ -4112,7 +4112,7 @@ The method used must be an out-of-band method."
4112 (tramp-shell-quote-argument localname)))) 4112 (tramp-shell-quote-argument localname))))
4113 (tramp-error v 'file-error "Couldn't delete %s" directory)))) 4113 (tramp-error v 'file-error "Couldn't delete %s" directory))))
4114 4114
4115(defun tramp-handle-delete-file (filename &optional force) 4115(defun tramp-handle-delete-file (filename &optional trash)
4116 "Like `delete-file' for Tramp files." 4116 "Like `delete-file' for Tramp files."
4117 (setq filename (expand-file-name filename)) 4117 (setq filename (expand-file-name filename))
4118 (with-parsed-tramp-file-name filename nil 4118 (with-parsed-tramp-file-name filename nil
@@ -4629,7 +4629,7 @@ beginning of local filename are not substituted."
4629 4629
4630 ;; Cleanup. We remove all file cache values for the connection, 4630 ;; Cleanup. We remove all file cache values for the connection,
4631 ;; because the remote process could have changed them. 4631 ;; because the remote process could have changed them.
4632 (when tmpinput (tramp-compat-delete-file tmpinput 'force)) 4632 (when tmpinput (tramp-compat-delete-file tmpinput))
4633 4633
4634 ;; `process-file-side-effects' has been introduced with GNU 4634 ;; `process-file-side-effects' has been introduced with GNU
4635 ;; Emacs 23.2. If set to `nil', no remote file will be changed 4635 ;; Emacs 23.2. If set to `nil', no remote file will be changed
@@ -4666,7 +4666,7 @@ Lisp error raised when PROGRAM is nil is trapped also, returning 1."
4666 (when delete (delete-region start end)) 4666 (when delete (delete-region start end))
4667 (unwind-protect 4667 (unwind-protect
4668 (apply 'call-process program tmpfile buffer display args) 4668 (apply 'call-process program tmpfile buffer display args)
4669 (tramp-compat-delete-file tmpfile 'force)))) 4669 (tramp-compat-delete-file tmpfile))))
4670 4670
4671(defun tramp-handle-shell-command 4671(defun tramp-handle-shell-command
4672 (command &optional output-buffer error-buffer) 4672 (command &optional output-buffer error-buffer)
@@ -4731,7 +4731,7 @@ Lisp error raised when PROGRAM is nil is trapped also, returning 1."
4731 (when (listp buffer) 4731 (when (listp buffer)
4732 (with-current-buffer error-buffer 4732 (with-current-buffer error-buffer
4733 (insert-file-contents (cadr buffer))) 4733 (insert-file-contents (cadr buffer)))
4734 (tramp-compat-delete-file (cadr buffer) 'force)) 4734 (tramp-compat-delete-file (cadr buffer)))
4735 (if current-buffer-p 4735 (if current-buffer-p
4736 ;; This is like exchange-point-and-mark, but doesn't 4736 ;; This is like exchange-point-and-mark, but doesn't
4737 ;; activate the mark. It is cleaner to avoid activation, 4737 ;; activate the mark. It is cleaner to avoid activation,
@@ -4813,7 +4813,7 @@ Lisp error raised when PROGRAM is nil is trapped also, returning 1."
4813 (unwind-protect 4813 (unwind-protect
4814 (tramp-call-local-coding-command 4814 (tramp-call-local-coding-command
4815 loc-dec tmpfile2 tmpfile) 4815 loc-dec tmpfile2 tmpfile)
4816 (tramp-compat-delete-file tmpfile2 'force))))) 4816 (tramp-compat-delete-file tmpfile2)))))
4817 4817
4818 ;; Set proper permissions. 4818 ;; Set proper permissions.
4819 (set-file-modes tmpfile (tramp-default-file-modes filename)) 4819 (set-file-modes tmpfile (tramp-default-file-modes filename))
@@ -4826,7 +4826,7 @@ Lisp error raised when PROGRAM is nil is trapped also, returning 1."
4826 4826
4827 ;; Error handling. 4827 ;; Error handling.
4828 ((error quit) 4828 ((error quit)
4829 (tramp-compat-delete-file tmpfile 'force) 4829 (tramp-compat-delete-file tmpfile)
4830 (signal (car err) (cdr err)))) 4830 (signal (car err) (cdr err))))
4831 4831
4832 (run-hooks 'tramp-handle-file-local-copy-hook) 4832 (run-hooks 'tramp-handle-file-local-copy-hook)
@@ -4961,11 +4961,10 @@ coding system might not be determined. This function repairs it."
4961 (set-buffer-modified-p nil)) 4961 (set-buffer-modified-p nil))
4962 (when (and (stringp local-copy) 4962 (when (and (stringp local-copy)
4963 (or remote-copy (null tramp-temp-buffer-file-name))) 4963 (or remote-copy (null tramp-temp-buffer-file-name)))
4964 (tramp-compat-delete-file local-copy 'force)) 4964 (tramp-compat-delete-file local-copy))
4965 (when (stringp remote-copy) 4965 (when (stringp remote-copy)
4966 (tramp-compat-delete-file 4966 (tramp-compat-delete-file
4967 (tramp-make-tramp-file-name method user host remote-copy) 4967 (tramp-make-tramp-file-name method user host remote-copy))))))
4968 'force)))))
4969 4968
4970 ;; Result. 4969 ;; Result.
4971 (list (expand-file-name filename) 4970 (list (expand-file-name filename)
@@ -5155,7 +5154,7 @@ Returns a file name in `tramp-auto-save-directory' for autosaving this file."
5155 (list start end tmpfile append 'no-message lockname confirm)) 5154 (list start end tmpfile append 'no-message lockname confirm))
5156 ((error quit) 5155 ((error quit)
5157 (setq tramp-temp-buffer-file-name nil) 5156 (setq tramp-temp-buffer-file-name nil)
5158 (tramp-compat-delete-file tmpfile 'force) 5157 (tramp-compat-delete-file tmpfile)
5159 (signal (car err) (cdr err)))) 5158 (signal (car err) (cdr err))))
5160 5159
5161 ;; Now, `last-coding-system-used' has the right value. Remember it. 5160 ;; Now, `last-coding-system-used' has the right value. Remember it.
@@ -5199,13 +5198,13 @@ Returns a file name in `tramp-auto-save-directory' for autosaving this file."
5199 (copy-file tmpfile filename t) 5198 (copy-file tmpfile filename t)
5200 ((error quit) 5199 ((error quit)
5201 (setq tramp-temp-buffer-file-name nil) 5200 (setq tramp-temp-buffer-file-name nil)
5202 (tramp-compat-delete-file tmpfile 'force) 5201 (tramp-compat-delete-file tmpfile)
5203 (signal (car err) (cdr err))))) 5202 (signal (car err) (cdr err)))))
5204 (setq tramp-temp-buffer-file-name nil) 5203 (setq tramp-temp-buffer-file-name nil)
5205 ;; Don't rename, in order to keep context in SELinux. 5204 ;; Don't rename, in order to keep context in SELinux.
5206 (unwind-protect 5205 (unwind-protect
5207 (copy-file tmpfile filename t) 5206 (copy-file tmpfile filename t)
5208 (tramp-compat-delete-file tmpfile 'force)))) 5207 (tramp-compat-delete-file tmpfile))))
5209 5208
5210 ;; Use inline file transfer. 5209 ;; Use inline file transfer.
5211 (rem-dec 5210 (rem-dec
@@ -5290,7 +5289,7 @@ Returns a file name in `tramp-auto-save-directory' for autosaving this file."
5290 filename rem-dec))))) 5289 filename rem-dec)))))
5291 5290
5292 ;; Save exit. 5291 ;; Save exit.
5293 (tramp-compat-delete-file tmpfile 'force))) 5292 (tramp-compat-delete-file tmpfile)))
5294 5293
5295 ;; That's not expected. 5294 ;; That's not expected.
5296 (t 5295 (t
@@ -6373,7 +6372,7 @@ hosts, or files, disagree."
6373 "Remove temporary files related to current buffer." 6372 "Remove temporary files related to current buffer."
6374 (when (stringp tramp-temp-buffer-file-name) 6373 (when (stringp tramp-temp-buffer-file-name)
6375 (condition-case nil 6374 (condition-case nil
6376 (tramp-compat-delete-file tramp-temp-buffer-file-name 'force) 6375 (tramp-compat-delete-file tramp-temp-buffer-file-name)
6377 (error nil)))) 6376 (error nil))))
6378 6377
6379(add-hook 'kill-buffer-hook 'tramp-delete-temp-file-function) 6378(add-hook 'kill-buffer-hook 'tramp-delete-temp-file-function)
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el
index bf9d4b8da47..5e7699b3543 100644
--- a/lisp/progmodes/verilog-mode.el
+++ b/lisp/progmodes/verilog-mode.el
@@ -2446,12 +2446,12 @@ See also `verilog-font-lock-extra-types'.")
2446 (list 2446 (list
2447 (concat "\\<function\\>\\s-+\\(integer\\|real\\(time\\)?\\|time\\)\\s-+\\(\\sw+\\)" ) 2447 (concat "\\<function\\>\\s-+\\(integer\\|real\\(time\\)?\\|time\\)\\s-+\\(\\sw+\\)" )
2448 '(1 font-lock-keyword-face) 2448 '(1 font-lock-keyword-face)
2449 '(3 font-lock-reference-face prepend)) 2449 '(3 font-lock-constant-face prepend))
2450 '("\\<function\\>\\s-+\\(\\[[^]]+\\]\\)\\s-+\\(\\sw+\\)" 2450 '("\\<function\\>\\s-+\\(\\[[^]]+\\]\\)\\s-+\\(\\sw+\\)"
2451 (1 font-lock-keyword-face) 2451 (1 font-lock-keyword-face)
2452 (2 font-lock-reference-face append)) 2452 (2 font-lock-constant-face append))
2453 '("\\<function\\>\\s-+\\(\\sw+\\)" 2453 '("\\<function\\>\\s-+\\(\\sw+\\)"
2454 1 'font-lock-reference-face append)))) 2454 1 'font-lock-constant-face append))))
2455 2455
2456 (setq verilog-font-lock-keywords-2 2456 (setq verilog-font-lock-keywords-2
2457 (append verilog-font-lock-keywords-1 2457 (append verilog-font-lock-keywords-1
diff --git a/lisp/server.el b/lisp/server.el
index 6b5f2486332..fd2026c4ab8 100644
--- a/lisp/server.el
+++ b/lisp/server.el
@@ -345,7 +345,7 @@ If CLIENT is non-nil, add a description of it to the logged message."
345 (and (process-contact proc :server) 345 (and (process-contact proc :server)
346 (eq (process-status proc) 'closed) 346 (eq (process-status proc) 'closed)
347 (ignore-errors 347 (ignore-errors
348 (delete-file (process-get proc :server-file) t))) 348 (delete-file (process-get proc :server-file))))
349 (server-log (format "Status changed to %s: %s" (process-status proc) msg) proc) 349 (server-log (format "Status changed to %s: %s" (process-status proc) msg) proc)
350 (server-delete-client proc)) 350 (server-delete-client proc))
351 351
diff --git a/lisp/speedbar.el b/lisp/speedbar.el
index 60c1ff6b170..5e732b398f3 100644
--- a/lisp/speedbar.el
+++ b/lisp/speedbar.el
@@ -1644,8 +1644,8 @@ Files can be renamed to new names or moved to new directories."
1644 (if (speedbar-y-or-n-p (format "Delete %s? " f) t) 1644 (if (speedbar-y-or-n-p (format "Delete %s? " f) t)
1645 (progn 1645 (progn
1646 (if (file-directory-p f) 1646 (if (file-directory-p f)
1647 (delete-directory f) 1647 (delete-directory f t t)
1648 (delete-file f)) 1648 (delete-file f t))
1649 (speedbar-message "Okie dokie.") 1649 (speedbar-message "Okie dokie.")
1650 (let ((p (point))) 1650 (let ((p (point)))
1651 (speedbar-refresh) 1651 (speedbar-refresh)