Function: emerge-files-internal
emerge-files-internal is a byte-compiled function defined in
emerge.el.gz.
Signature
(emerge-files-internal FILE-A FILE-B &optional STARTUP-HOOKS QUIT-HOOKS OUTPUT-FILE)
Source Code
;; Defined in /usr/src/emacs/lisp/vc/emerge.el.gz
;;; Setup functions for two-file mode.
(defun emerge-files-internal (file-A file-B &optional startup-hooks quit-hooks
output-file)
(if (not (file-readable-p file-A))
(error "File `%s' does not exist or is not readable" file-A))
(if (not (file-readable-p file-B))
(error "File `%s' does not exist or is not readable" file-B))
(let ((buffer-A (find-file-noselect file-A))
(buffer-B (find-file-noselect file-B)))
;; Record the directories of the files
(setq emerge-last-dir-A (file-name-directory file-A))
(setq emerge-last-dir-B (file-name-directory file-B))
(if output-file
(setq emerge-last-dir-output (file-name-directory output-file)))
;; Make sure the entire files are seen, and they reflect what is on disk
(with-current-buffer
buffer-A
(widen)
(let ((temp (file-local-copy file-A)))
(if temp
(setq file-A temp
startup-hooks
(cons (lambda () (delete-file file-A))
startup-hooks))
;; Verify that the file matches the buffer
(emerge-verify-file-buffer))))
(with-current-buffer
buffer-B
(widen)
(let ((temp (file-local-copy file-B)))
(if temp
(setq file-B temp
startup-hooks
(cons (lambda () (delete-file file-B))
startup-hooks))
;; Verify that the file matches the buffer
(emerge-verify-file-buffer))))
(emerge-setup buffer-A file-A buffer-B file-B startup-hooks quit-hooks
output-file)))