/* Window creation, deletion and examination for GNU Emacs.
Does not include redisplay.
Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 2000,
/* Window creation, deletion and examination for GNU Emacs.
Does not include redisplay.
Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of GNU Emacs.
Free Software Foundation, Inc.
This file is part of GNU Emacs.
Lisp_Object Qwindowp, Qwindow_live_p, Qwindow_configuration_p;
Lisp_Object Qdisplay_buffer;
Lisp_Object Qwindowp, Qwindow_live_p, Qwindow_configuration_p;
Lisp_Object Qdisplay_buffer;
Lisp_Object Qwindow_size_fixed;
extern Lisp_Object Qleft_margin, Qright_margin;
Lisp_Object Qwindow_size_fixed;
extern Lisp_Object Qleft_margin, Qright_margin;
+ /* Commenting out the following assertion goes against the stated interface
+ of the function, but it currently does not seem to do anything useful.
+ See discussion of this issue in the thread for bug#4534.
+ xassert (delta >= 0); */
/* Compute how much we can enlarge the mini-window without deleting
other windows. */
root = XWINDOW (FRAME_ROOT_WINDOW (f));
/* Compute how much we can enlarge the mini-window without deleting
other windows. */
root = XWINDOW (FRAME_ROOT_WINDOW (f));
{
int min_height = window_min_size (root, 0, 0, 0, 0);
if (XFASTINT (root->total_lines) - delta < min_height)
{
int min_height = window_min_size (root, 0, 0, 0, 0);
if (XFASTINT (root->total_lines) - delta < min_height)
if (!NILP (Vscroll_preserve_screen_position))
{
/* We preserve the goal pixel coordinate across consecutive
if (!NILP (Vscroll_preserve_screen_position))
{
/* We preserve the goal pixel coordinate across consecutive
possibility of point becoming "stuck" on a tall line when
scrolling by one line. */
if (window_scroll_pixel_based_preserve_y < 0
possibility of point becoming "stuck" on a tall line when
scrolling by one line. */
if (window_scroll_pixel_based_preserve_y < 0
- || (!EQ (current_kboard->Vlast_command, Qscroll_up)
- && !EQ (current_kboard->Vlast_command, Qscroll_down)))
+ || !SYMBOLP (current_kboard->Vlast_command)
+ || NILP (Fget (current_kboard->Vlast_command, Qscroll_command)))
{
start_display (&it, w, start);
move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS);
{
start_display (&it, w, start);
move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS);
- || (!EQ (current_kboard->Vlast_command, Qscroll_up)
- && !EQ (current_kboard->Vlast_command, Qscroll_down)))
+ || !SYMBOLP (current_kboard->Vlast_command)
+ || NILP (Fget (current_kboard->Vlast_command, Qscroll_command)))
{
struct position posit
= *compute_motion (startpos, 0, 0, 0,
{
struct position posit
= *compute_motion (startpos, 0, 0, 0,
- Qwindow_size_fixed = intern ("window-size-fixed");
+ Qscroll_command = intern_c_string ("scroll-command");
+ staticpro (&Qscroll_command);
+
+ Fput (Qscroll_up, Qscroll_command, Qt);
+ Fput (Qscroll_down, Qscroll_command, Qt);
+
+ Qwindow_size_fixed = intern_c_string ("window-size-fixed");
staticpro (&Qwindow_size_fixed);
Fset (Qwindow_size_fixed, Qnil);
staticpro (&Qwindow_configuration_change_hook);
Qwindow_configuration_change_hook
staticpro (&Qwindow_size_fixed);
Fset (Qwindow_size_fixed, Qnil);
staticpro (&Qwindow_configuration_change_hook);
Qwindow_configuration_change_hook
A value of t means point keeps its screen position if the scroll
command moved it vertically out of the window, e.g. when scrolling
by full screens.
A value of t means point keeps its screen position if the scroll
command moved it vertically out of the window, e.g. when scrolling
by full screens.
-Any other value means point always keeps its screen position. */);
+Any other value means point always keeps its screen position.
+Scroll commands should have the `scroll-command' property
+on their symbols to be controlled by this variable. */);
Vscroll_preserve_screen_position = Qnil;
DEFVAR_LISP ("window-point-insertion-type", &Vwindow_point_insertion_type,
Vscroll_preserve_screen_position = Qnil;
DEFVAR_LISP ("window-point-insertion-type", &Vwindow_point_insertion_type,
initial_define_key (control_x_map, '<', "scroll-left");
initial_define_key (control_x_map, '>', "scroll-right");
initial_define_key (control_x_map, '<', "scroll-left");
initial_define_key (control_x_map, '>', "scroll-right");
- initial_define_key (meta_map, 'v', "scroll-down");
-
- initial_define_key (global_map, Ctl('L'), "recenter");
- initial_define_key (meta_map, 'r', "move-to-window-line");
+ initial_define_key (meta_map, 'v', "scroll-down-command");