comparison lisp/vc.el @ 13536:af2fc95b03f0

(vc-directory): Require dired. (vc-revert-buffer): Ignore vc-suppress-confirm.
author Richard M. Stallman <rms@gnu.org>
date Mon, 13 Nov 1995 20:24:46 +0000
parents 45188809385d
children 5f5659a29e3a
comparison
equal deleted inserted replaced
13535:b077415f487d 13536:af2fc95b03f0
1335 (defun vc-directory (dirname verbose) 1335 (defun vc-directory (dirname verbose)
1336 "Show version-control status of the current directory and subdirectories. 1336 "Show version-control status of the current directory and subdirectories.
1337 Normally it creates a Dired buffer that lists only the locked files 1337 Normally it creates a Dired buffer that lists only the locked files
1338 in all these directories. With a prefix argument, it lists all files." 1338 in all these directories. With a prefix argument, it lists all files."
1339 (interactive "DDired under VC (directory): \nP") 1339 (interactive "DDired under VC (directory): \nP")
1340 (require 'dired)
1340 (setq dirname (expand-file-name dirname)) 1341 (setq dirname (expand-file-name dirname))
1341 ;; force a trailing slash 1342 ;; force a trailing slash
1342 (if (not (eq (elt dirname (1- (length dirname))) ?/)) 1343 (if (not (eq (elt dirname (1- (length dirname))) ?/))
1343 (setq dirname (concat dirname "/"))) 1344 (setq dirname (concat dirname "/")))
1344 (let (nonempty 1345 (let (nonempty
1575 (if vc-dired-mode 1576 (if vc-dired-mode
1576 (find-file-other-window (dired-get-filename))) 1577 (find-file-other-window (dired-get-filename)))
1577 (while vc-parent-buffer 1578 (while vc-parent-buffer
1578 (pop-to-buffer vc-parent-buffer)) 1579 (pop-to-buffer vc-parent-buffer))
1579 (let ((file buffer-file-name) 1580 (let ((file buffer-file-name)
1581 ;; This operation should always ask for confirmation.
1582 (vc-suppress-confirm nil)
1580 (obuf (current-buffer)) (changed (vc-diff nil t))) 1583 (obuf (current-buffer)) (changed (vc-diff nil t)))
1581 (if (and changed (or vc-suppress-confirm 1584 (if (and changed (not (yes-or-no-p "Discard changes? ")))
1582 (not (yes-or-no-p "Discard changes? "))))
1583 (progn 1585 (progn
1584 (if (and (window-dedicated-p (selected-window)) 1586 (if (and (window-dedicated-p (selected-window))
1585 (one-window-p t 'selected-frame)) 1587 (one-window-p t 'selected-frame))
1586 (make-frame-invisible (selected-frame)) 1588 (make-frame-invisible (selected-frame))
1587 (delete-window)) 1589 (delete-window))