summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-08-08 21:18:36 +0000
committerRichard M. Stallman <rms@gnu.org>1995-08-08 21:18:36 +0000
commitcb0803679e7122b80648befef6e750052cd12900 (patch)
tree00b246bb8f6786b2d058d9495f2e442001815abf /lisp
parent918f3d88657bb19f68c5f945bf2b5307473236c5 (diff)
downloademacs-cb0803679e7122b80648befef6e750052cd12900.tar.gz
(vc-revert-buffer): In a dedicated solitary window,
make the frame invisible instead of trying to delete window.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/vc.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/vc.el b/lisp/vc.el
index af950518703..fa38ca4f0d5 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -1372,11 +1372,17 @@ the file on the branch you are editing."
(if (and changed (or vc-suppress-confirm
(not (yes-or-no-p "Discard changes? "))))
(progn
- (delete-window)
+ (if (and (window-dedicated-p (selected-window))
+ (one-window-p t 'selected-frame))
+ (make-frame-invisible (selected-frame))
+ (delete-window))
(error "Revert cancelled"))
(set-buffer obuf))
(if changed
- (delete-window))
+ (if (and (window-dedicated-p (selected-window))
+ (one-window-p t 'selected-frame))
+ (make-frame-invisible (selected-frame))
+ (delete-window)))
(vc-backend-revert file)
(vc-resynch-window file t t)
)