Function: shadow-copy-file
shadow-copy-file is a byte-compiled function defined in
shadowfile.el.gz.
Signature
(shadow-copy-file S)
Documentation
Copy one shadow file.
Source Code
;; Defined in /usr/src/emacs/lisp/shadowfile.el.gz
(defun shadow-copy-file (s)
"Copy one shadow file."
(let* ((buffer
(cond ((get-file-buffer
(abbreviate-file-name (shadow-expand-file-name (car s)))))
((not (file-readable-p (car s)))
(if (y-or-n-p
(format "Cannot find file %s--cancel copy request? "
(car s)))
(shadow-remove-from-todo s))
nil)
((or (eq t shadow-noquery)
(y-or-n-p
(format "No buffer for %s -- update shadow anyway? "
(car s))))
(find-file-noselect (car s)))))
(to (shadow-expand-cluster-in-file-name (cdr s))))
(when buffer
(set-buffer buffer)
(condition-case nil
(progn
(write-region nil nil to)
(shadow-remove-from-todo s))
(error (message "Shadow %s not updated!" (cdr s)))))))