Article View: gnu.emacs.bug
Article #88000vc-steal-lock doesn't update mode line, restore correct window configuration
From: Jonathan I. Kamens
Date: Sat, 13 Aug 1994 03:26
Date: Sat, 13 Aug 1994 03:26
87 lines
4344 bytes
4344 bytes
In GNU Emacs 19.25.2 of Fri Aug 12 1994 on gza-client1 (sparc-sun-sunos4.1.3)
When I steal a lock, the mode line of the file whose lock I stole
isn't updated, and the window configuration before the steal isn't
properly restored after the steal notification message is sent.
The ChangeLog entry and patch below fix this.
Fri Aug 12 17:53:14 1994 Jonathan I. Kamens (jik@gza-client1)
* vc.el (vc-steal-lock): Pass the current window configuration into
vc-finish-steal.
(vc-finish-steal): Restore the window configuration so that the
correct buffer will be current when vc-resynch-window is called and so
that mail-bury will do the right thing. Switch to the *VC-mail*
buffer so that mail-bury will do the right thing.
*** vc.el 1994/08/12 17:17:35 1.1
--- vc.el 1994/08/12 17:53:13
***************
*** 575,602 ****
(defun vc-steal-lock (file rev &optional owner)
"Steal the lock on the current workfile."
(interactive)
! (if (not owner)
! (setq owner (vc-locking-user file)))
! (if (not (y-or-n-p (format "Take the lock on %s:%s from %s? " file rev owner)))
! (error "Steal cancelled"))
! (pop-to-buffer (get-buffer-create "*VC-mail*"))
! (setq default-directory (expand-file-name "~/"))
! (auto-save-mode auto-save-default)
! (mail-mode)
! (erase-buffer)
! (mail-setup owner (format "%s:%s" file rev) nil nil nil
! (list (list 'vc-finish-steal file rev)))
! (goto-char (point-max))
! (insert
! (format "I stole the lock on %s:%s, " file rev)
! (current-time-string)
! ".\n")
! (message "Please explain why you stole the lock. Type C-c C-c when done."))
;; This is called when the notification has been sent.
! (defun vc-finish-steal (file version)
(vc-backend-steal file version)
! (vc-resynch-window file t t))
(defun vc-checkin (file &optional rev comment)
"Check in the file specified by FILE.
--- 575,611 ----
(defun vc-steal-lock (file rev &optional owner)
"Steal the lock on the current workfile."
(interactive)
! (let ((configuration (current-window-configuration)))
! (if (not owner)
! (setq owner (vc-locking-user file)))
! (if (not (y-or-n-p (format "Take the lock on %s:%s from %s? " file rev owner)))
! (error "Steal cancelled"))
! (pop-to-buffer (get-buffer-create "*VC-mail*"))
! (setq default-directory (expand-file-name "~/"))
! (auto-save-mode auto-save-default)
! (mail-mode)
! (erase-buffer)
! (mail-setup owner (format "%s:%s" file rev) nil nil nil
! (list (list 'vc-finish-steal file rev configuration)))
! (goto-char (point-max))
! (insert
! (format "I stole the lock on %s:%s, " file rev)
! (current-time-string)
! ".\n")
! (message "Please explain why you stole the lock. Type C-c C-c when done.")))
;; This is called when the notification has been sent.
! ;
! ; We switch back to the configuration that was in effect before the
! ; notification window was popped so that we'll be in the right buffer
! ; when vc-resynch-window is run, and so that mail-bury will do the
! ; right thing later; we then switch to the *VC-mail* buffer so that
! ; mail-bury will do the right thing.
! (defun vc-finish-steal (file version configuration)
! (set-window-configuration configuration)
(vc-backend-steal file version)
! (vc-resynch-window file t t)
! (switch-to-buffer (get-buffer-create "*VC-mail*")))
(defun vc-checkin (file &optional rev comment)
"Check in the file specified by FILE.
Technical Details
Message-ID:
<199408121755.NAA12760@gza-client1.aktis.com>Path:
arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!primenet!netnews.asu.edu !asuvax!cs.utexas.edu!swrinde!howland.reston.ans.net!math.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!cam.ov.COM!jikShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,69223e81590f14cf,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1994-08-13 06:23:47 PST Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!primenet!netnews.asu.edu !asuvax!cs.utexas.edu!swrinde!howland.reston.ans.net!math.ohio-state.edu!pacific.mps.ohio-state.edu!cis.ohio-state.edu!cam.ov.COM!jik From: jik@cam.ov.COM (Jonathan I. Kamens) Newsgroups: gnu.emacs.bug Subject: vc-steal-lock doesn't update mode line, restore correct window configuration Date: 12 Aug 1994 23:26:42 -0400 Organization: GNUs Not Usenet Lines: 88 Sender: daemon@cis.ohio-state.edu Approved: bug-gnu-emacs@prep.ai.mit.edu Distribution: gnu Message-ID: <199408121755.NAA12760@gza-client1.aktis.com>