Function: ediff-maybe-checkout

ediff-maybe-checkout is a byte-compiled function defined in ediff-util.el.gz.

Signature

(ediff-maybe-checkout BUF)

Source Code

;; Defined in /usr/src/emacs/lisp/vc/ediff-util.el.gz
;; checkout if visited file is checked in
(defun ediff-maybe-checkout (buf)
  (let ((file (expand-file-name (buffer-file-name buf)))
	(checkout-function (key-binding "\C-x\C-q")))
    (if (and (ediff-file-checked-in-p file)
	     (or (beep 1) t)
	     (y-or-n-p
	      (format
	       "File %s is under version control.  Check it out? "
	       (ediff-abbreviate-file-name file))))
	(ediff-with-current-buffer buf
	  (command-execute checkout-function)))))