[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#4933: 23.1.50; RCS buffer: save-buffer moves point to beginning of b
From: |
Stefan Monnier |
Subject: |
bug#4933: 23.1.50; RCS buffer: save-buffer moves point to beginning of buffer |
Date: |
Mon, 16 Nov 2009 09:41:17 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) |
> Start Emacs with -Q -q.
> C-x C-f a file with an RCS version control file behind it.
> perform some edit somewhere.
> C-x C-s.
> Bug: Point does not stay where it was, but jumps to the beginning of the file.
> (Note that this does not seem to occur with, e.g., svn-controlled files.)
Thank you for that precise bug report. I've just installed the patch
below which should fix it,
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