[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 23.0.60; C-x v v in an ordinary file throws strange error
From: |
Eric Hanchrow |
Subject: |
Re: 23.0.60; C-x v v in an ordinary file throws strange error |
Date: |
Wed, 27 Feb 2008 07:39:23 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) |
This sounds dimly familiar; I think the fix is to call buffer-live-p
instead of merely checking that the isn't nil (note that the following
three patches are somewhat disorganized; I think one patch obviates
another, but you get the idea):
git show d92d80884f25a3d58d2a799c3426d498dadbc6a6
commit d92d80884f25a3d58d2a799c3426d498dadbc6a6
Author: Eric Hanchrow <address@hidden>
Date: Fri Feb 15 15:01:00 2008 -0800
(and x (buffer-live-p x)) => (buffer-live-p x)
diff --git a/lisp/vc.el b/lisp/vc.el
index 584b58d..ec59361 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -1354,8 +1354,7 @@ Otherwise, throw an error."
(list (vc-status-current-file)))))
((vc-backend buffer-file-name)
(list buffer-file-name))
- ((and vc-parent-buffer
- (buffer-live-p vc-parent-buffer)
+ ((and (buffer-live-p vc-parent-buffer)
(or (buffer-file-name vc-parent-buffer)
(with-current-buffer vc-parent-buffer
vc-dired-mode)))
@@ -1389,8 +1388,7 @@ Otherwise, throw an error."
((eq major-mode 'vc-status-mode)
(set-buffer (find-file-noselect (vc-status-current-file))))
(t
- (while (and vc-parent-buffer
- (buffer-live-p vc-parent-buffer)
+ (while (and (buffer-live-p vc-parent-buffer)
;; Avoid infinite looping when vc-parent-buffer and
;; current buffer are the same buffer.
(not (eq vc-parent-buffer (current-buffer))))
07:36:29 address@hidden emacs-via-git]$ git show
d20791cd96cf39e630e85b3b77cee4eb945a3783
commit d20791cd96cf39e630e85b3b77cee4eb945a3783
Author: Eric Hanchrow <address@hidden>
Date: Fri Feb 15 14:26:00 2008 -0800
vc-deduce-fileset: similarly to dfbfd942, call buffer-live-p
diff --git a/lisp/vc.el b/lisp/vc.el
index 102eeef..584b58d 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -1354,9 +1354,11 @@ Otherwise, throw an error."
(list (vc-status-current-file)))))
((vc-backend buffer-file-name)
(list buffer-file-name))
- ((and vc-parent-buffer (or (buffer-file-name vc-parent-buffer)
- (with-current-buffer vc-parent-buffer
- vc-dired-mode)))
+ ((and vc-parent-buffer
+ (buffer-live-p vc-parent-buffer)
+ (or (buffer-file-name vc-parent-buffer)
+ (with-current-buffer vc-parent-buffer
+ vc-dired-mode)))
(progn
(set-buffer vc-parent-buffer)
(vc-deduce-fileset)))
07:36:46 address@hidden emacs-via-git]$ git show dfbfd942
commit dfbfd942a3c3e667a6f7b09f2d52f91e541a8b01
Author: Stefan Monnier <address@hidden>
Date: Sun Jan 6 16:02:38 2008 +0000
(vc-ensure-vc-buffer): Check liveness of vc-parent-buffer.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c8e3dc4..4a874b5 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2008-01-06 Stefan Monnier <address@hidden>
+
+ * vc.el (vc-ensure-vc-buffer): Check liveness of vc-parent-buffer.
+
2008-01-06 Dan Nicolaescu <address@hidden>
* vc.el (vc-status-fileinfo): New defstruct.
diff --git a/lisp/vc.el b/lisp/vc.el
index 9e5df68..61a2c67 100644
--- a/lisp/vc.el
+++ b/lisp/vc.el
@@ -1310,6 +1310,7 @@ Otherwise, throw an error."
(if vc-dired-mode
(set-buffer (find-file-noselect (dired-get-filename)))
(while (and vc-parent-buffer
+ (buffer-live-p vc-parent-buffer)
;; Avoid infinite looping when vc-parent-buffer and
;; current buffer are the same buffer.
(not (eq vc-parent-buffer (current-buffer))))
--
None of the ... actors do anything we couldn't do if we looked
like them.
-- Roger Ebert, reviewing "The Chronicles Of Riddick"