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).
This commit is contained in:
parent
7e5bfb8fec
commit
adc47434a2
4 changed files with 23 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
2011-07-14 Martin Rudalics <rudalics@gmx.at>
|
||||
|
||||
* window.el (display-buffer-normalize-special): Replace
|
||||
`dedicated' by `dedicate' to dedicate window (Bug#9072).
|
||||
|
||||
2011-07-14 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* subr.el (version<, version<=, version=): Mention "-CVS" and
|
||||
|
|
|
@ -5317,12 +5317,12 @@ user preferences expressed in `display-buffer-alist'."
|
|||
(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'.
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2011-07-14 Martin Rudalics <rudalics@gmx.at>
|
||||
|
||||
* 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 <larsi@gnus.org>
|
||||
|
||||
* editfns.c (Fstring_to_char): Clarify just what is returned
|
||||
|
|
14
src/indent.c
14
src/indent.c
|
@ -1985,7 +1985,8 @@ whether or not it is currently displayed in some window. */)
|
|||
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 @@ whether or not it is currently displayed in some window. */)
|
|||
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 @@ whether or not it is currently displayed in some window. */)
|
|||
}
|
||||
|
||||
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));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue