Function: eshell-mvcpln-template
eshell-mvcpln-template is a macro defined in em-unix.el.gz.
Signature
(eshell-mvcpln-template COMMAND ACTION FUNC QUERY-VAR FORCE-VAR &optional PRESERVE)
Source Code
;; Defined in /usr/src/emacs/lisp/eshell/em-unix.el.gz
;; this is to avoid duplicating code...
(defmacro eshell-mvcpln-template (command action func query-var
force-var &optional preserve)
`(let ((len (length args)))
(if (or (= len 0)
(and (= len 1) (null eshell-default-target-is-dot)))
(error "%s: missing destination file or directory" ,command))
(if (= len 1)
(nconc args '(".")))
(setq args (eshell-stringify-list (flatten-tree args)))
(if (and ,(not (equal command "ln"))
(string-match eshell-tar-regexp (car (last args)))
(or (> (length args) 2)
(and (file-directory-p (car args))
(or (not no-dereference)
(not (file-symlink-p (car args)))))))
(eshell-shorthand-tar-command ,command args)
(let ((target (car (last args))))
(setcdr (last args 2) nil)
(eshell-shuffle-files
,command ,action args target ,func nil
,@(append
`((if (and (or em-interactive
,query-var)
(not force))
1 (or force ,force-var)))
(if preserve
(list preserve)))))
nil)))