diff options
| -rw-r--r-- | lisp/vc.el | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/lisp/vc.el b/lisp/vc.el index 657325462c2..2257363ae5a 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: Eric S. Raymond <esr@snark.thyrsus.com> | 5 | ;; Author: Eric S. Raymond <esr@snark.thyrsus.com> |
| 6 | ;; Maintainer: Andre Spiegel <spiegel@inf.fu-berlin.de> | 6 | ;; Maintainer: Andre Spiegel <spiegel@inf.fu-berlin.de> |
| 7 | 7 | ||
| 8 | ;; $Id: vc.el,v 1.213 1998/03/31 17:19:32 spiegel Exp spiegel $ | 8 | ;; $Id: vc.el,v 1.214 1998/03/31 18:08:36 spiegel Exp spiegel $ |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
| @@ -1940,23 +1940,17 @@ use C-u \\[vc-next-action] RET to do so." | |||
| 1940 | ;; This operation should always ask for confirmation. | 1940 | ;; This operation should always ask for confirmation. |
| 1941 | (vc-suppress-confirm nil) | 1941 | (vc-suppress-confirm nil) |
| 1942 | (obuf (current-buffer)) (changed (vc-diff nil t))) | 1942 | (obuf (current-buffer)) (changed (vc-diff nil t))) |
| 1943 | (if (and changed (not (yes-or-no-p "Discard changes? "))) | 1943 | (if changed |
| 1944 | (progn | 1944 | (unwind-protect |
| 1945 | (if (not (yes-or-no-p "Discard changes? ")) | ||
| 1946 | (error "Revert cancelled")) | ||
| 1945 | (if (and (window-dedicated-p (selected-window)) | 1947 | (if (and (window-dedicated-p (selected-window)) |
| 1946 | (one-window-p t 'selected-frame)) | 1948 | (one-window-p t 'selected-frame)) |
| 1947 | (make-frame-invisible (selected-frame)) | 1949 | (make-frame-invisible (selected-frame)) |
| 1948 | (delete-window)) | 1950 | (delete-window)))) |
| 1949 | (error "Revert cancelled")) | 1951 | (set-buffer obuf) |
| 1950 | (set-buffer obuf)) | ||
| 1951 | (if changed | ||
| 1952 | (if (and (window-dedicated-p (selected-window)) | ||
| 1953 | (one-window-p t 'selected-frame)) | ||
| 1954 | (make-frame-invisible (selected-frame)) | ||
| 1955 | (delete-window))) | ||
| 1956 | (vc-backend-revert file) | 1952 | (vc-backend-revert file) |
| 1957 | (vc-resynch-window file t t) | 1953 | (vc-resynch-window file t t))) |
| 1958 | ) | ||
| 1959 | ) | ||
| 1960 | 1954 | ||
| 1961 | ;;;###autoload | 1955 | ;;;###autoload |
| 1962 | (defun vc-cancel-version (norevert) | 1956 | (defun vc-cancel-version (norevert) |