[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#4936: 23.1.50; Position jumps when saving RCS-versioned files
From: |
Stefan Monnier |
Subject: |
bug#4936: 23.1.50; Position jumps when saving RCS-versioned files |
Date: |
Mon, 16 Nov 2009 09:42:36 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
merge 4936 4933
thanks
> When saving a file which is under version control with RCS (no RCS
> directory, but I didn't test with an RCS dir), the position jumps to the
> beginning of the file.
I believe I've just fixed this bug with the patch below,
Stefan
--- vc-rcs.el.~1.97.~ 2009-11-15 23:34:56.000000000 -0500
+++ vc-rcs.el 2009-11-16 09:38:57.000000000 -0500
@@ -1056,6 +1056,7 @@
((not (get-file-buffer file)) nil)
((let (status version locking-user)
(with-current-buffer (get-file-buffer file)
+ (save-excursion
(goto-char (point-min))
(cond
;; search for $Id or $Header
@@ -1112,7 +1113,7 @@
(setq status 'rev)))
;; else: nothing found
;; -------------------
- (t nil)))
+ (t nil))))
(if status (vc-file-setprop file 'vc-working-revision version))
(and (eq status 'rev-and-lock)
(vc-file-setprop file 'vc-state