Function: viper-maybe-checkout

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

Signature

(viper-maybe-checkout BUF)

Source Code

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