[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/buffer.c,v
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/src/buffer.c,v |
Date: |
Sun, 07 Sep 2008 01:22:28 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Stefan Monnier <monnier> 08/09/07 01:22:27
Index: buffer.c
===================================================================
RCS file: /sources/emacs/emacs/src/buffer.c,v
retrieving revision 1.567
retrieving revision 1.568
diff -u -b -r1.567 -r1.568
--- buffer.c 29 Aug 2008 06:50:34 -0000 1.567
+++ buffer.c 7 Sep 2008 01:22:27 -0000 1.568
@@ -2269,6 +2269,26 @@
if (m->buffer == current_buffer)
m->buffer = other_buffer;
}
+ { /* Some of the C code expects that w->buffer == w->pointm->buffer.
+ So since we just swapped the markers between the two buffers, we need
+ to undo the effect of this swap for window markers. */
+ Lisp_Object w = Fselected_window (), ws = Qnil;
+ Lisp_Object buf1, buf2;
+ XSETBUFFER (buf1, current_buffer); XSETBUFFER (buf2, other_buffer);
+
+ while (NILP (Fmemq (w, ws)))
+ {
+ ws = Fcons (w, ws);
+ if (MARKERP (XWINDOW (w)->pointm)
+ && (EQ (XWINDOW (w)->buffer, buf1)
+ || EQ (XWINDOW (w)->buffer, buf2)))
+ Fset_marker (XWINDOW (w)->pointm,
+ make_number (BUF_BEGV (XBUFFER (XWINDOW (w)->buffer))),
+ XWINDOW (w)->buffer);
+ w = Fnext_window (w, Qt, Qt);
+ }
+ }
+
if (current_buffer->text->intervals)
(eassert (EQ (current_buffer->text->intervals->up.obj, buffer)),
XSETBUFFER (current_buffer->text->intervals->up.obj, current_buffer));
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/src/buffer.c,v,
Stefan Monnier <=