Function: tramp-skeleton-delete-file
tramp-skeleton-delete-file is a macro defined in tramp.el.gz.
Signature
(tramp-skeleton-delete-file FILENAME &optional TRASH &rest BODY)
Documentation
Skeleton for tramp-*-handle-delete-file.
BODY is the backend specific code.
Source Code
;; Defined in /usr/src/emacs/lisp/net/tramp.el.gz
(defmacro tramp-skeleton-delete-file (filename &optional trash &rest body)
"Skeleton for `tramp-*-handle-delete-file'.
BODY is the backend specific code."
(declare (indent 2) (debug t))
`(with-parsed-tramp-file-name (expand-file-name ,filename) nil
(let ((delete-by-moving-to-trash
(and delete-by-moving-to-trash
;; This variable exists since Emacs 30.1.
(not (bound-and-true-p
remote-file-name-inhibit-delete-by-moving-to-trash)))))
(if (and delete-by-moving-to-trash ,trash)
(move-file-to-trash ,filename)
,@body)
(tramp-flush-file-properties v localname))))