emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r105191: Fix bugs in vertical-motion


From: martin rudalics
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105191: Fix bugs in vertical-motion and display-buffer-normalize-special.
Date: Thu, 14 Jul 2011 10:30:34 +0200
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105191
committer: martin rudalics <address@hidden>
branch nick: trunk
timestamp: Thu 2011-07-14 10:30:34 +0200
message:
  Fix bugs in vertical-motion and display-buffer-normalize-special.
  
  * indent.c (Fvertical_motion): Set and restore w->pointm when
  saving and restoring the window's buffer (Bug#9006).
  
  * window.el (display-buffer-normalize-special): Replace
  `dedicated' by `dedicate' to dedicate window (Bug#9072).
modified:
  lisp/ChangeLog
  lisp/window.el
  src/ChangeLog
  src/indent.c
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-07-14 06:50:21 +0000
+++ b/lisp/ChangeLog    2011-07-14 08:30:34 +0000
@@ -1,3 +1,8 @@
+2011-07-14  Martin Rudalics  <address@hidden>
+
+       * window.el (display-buffer-normalize-special): Replace
+       `dedicated' by `dedicate' to dedicate window (Bug#9072).
+
 2011-07-14  Eli Zaretskii  <address@hidden>
 
        * subr.el (version<, version<=, version=): Mention "-CVS" and

=== modified file 'lisp/window.el'
--- a/lisp/window.el    2011-07-13 22:00:48 +0000
+++ b/lisp/window.el    2011-07-14 08:30:34 +0000
@@ -5317,12 +5317,12 @@
        (unless display-buffer-mark-dedicated
         ;; Don't make anything created above dedicated unless requested.
         ;; Otherwise the dedication request below gets in our way.
-        '((dedicated . nil)))
+        '((dedicate . nil)))
        `((pop-up-frame t)
         ,(append '(pop-up-frame-alist)
                  (when (listp args) args)
                  special-display-frame-alist)
-        (dedicated . t))))))
+        (dedicate . t))))))
 
 (defun display-buffer-normalize-default (buffer-or-name)
   "Subroutine of `display-buffer-normalize-specifiers'.

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-07-13 23:48:35 +0000
+++ b/src/ChangeLog     2011-07-14 08:30:34 +0000
@@ -1,3 +1,8 @@
+2011-07-14  Martin Rudalics  <address@hidden>
+
+       * indent.c (Fvertical_motion): Set and restore w->pointm when
+       saving and restoring the window's buffer (Bug#9006).
+
 2011-07-13  Lars Magne Ingebrigtsen  <address@hidden>
 
        * editfns.c (Fstring_to_char): Clarify just what is returned

=== modified file 'src/indent.c'
--- a/src/indent.c      2011-07-10 08:20:10 +0000
+++ b/src/indent.c      2011-07-14 08:30:34 +0000
@@ -1985,7 +1985,8 @@
   struct text_pos pt;
   struct window *w;
   Lisp_Object old_buffer;
-  struct gcpro gcpro1;
+  EMACS_INT old_charpos, old_bytepos;
+  struct gcpro gcpro1, gcpro2, gcpro3;
   Lisp_Object lcols = Qnil;
   double cols IF_LINT (= 0);
 
@@ -2005,12 +2006,16 @@
   w = XWINDOW (window);
 
   old_buffer = Qnil;
-  GCPRO1 (old_buffer);
+  GCPRO3 (old_buffer, old_charpos, old_bytepos);
   if (XBUFFER (w->buffer) != current_buffer)
     {
       /* Set the window's buffer temporarily to the current buffer.  */
       old_buffer = w->buffer;
+      old_charpos = XMARKER (w->pointm)->charpos;
+      old_bytepos = XMARKER (w->pointm)->bytepos;
       XSETBUFFER (w->buffer, current_buffer);
+      set_marker_both
+       (w->pointm, w->buffer, BUF_PT (current_buffer), BUF_PT_BYTE 
(current_buffer));
     }
 
   if (noninteractive)
@@ -2131,7 +2136,10 @@
     }
 
   if (BUFFERP (old_buffer))
-    w->buffer = old_buffer;
+    {
+      w->buffer = old_buffer;
+      set_marker_both (w->pointm, w->buffer, old_charpos, old_bytepos);
+    }
 
   RETURN_UNGCPRO (make_number (it.vpos));
 }


reply via email to

[Prev in Thread] Current Thread [Next in Thread]