[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/xdisp.c
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] Changes to emacs/src/xdisp.c |
Date: |
Sun, 03 Mar 2002 12:28:53 -0500 |
Index: emacs/src/xdisp.c
diff -c emacs/src/xdisp.c:1.730 emacs/src/xdisp.c:1.731
*** emacs/src/xdisp.c:1.730 Thu Feb 28 17:09:52 2002
--- emacs/src/xdisp.c Sun Mar 3 12:28:52 2002
***************
*** 584,593 ****
/* How close to the margin can point get before the window is scrolled
horizontally. */
! int automatic_hscroll_margin;
/* How much to scroll horizontally when point is inside the above margin. */
! Lisp_Object Vautomatic_hscroll_step;
/* A list of symbols, one for each supported image type. */
--- 584,593 ----
/* How close to the margin can point get before the window is scrolled
horizontally. */
! int hscroll_margin;
/* How much to scroll horizontally when point is inside the above margin. */
! Lisp_Object Vhscroll_step;
/* A list of symbols, one for each supported image type. */
***************
*** 8024,8045 ****
Lisp_Object window;
{
int hscrolled_p = 0;
! int hscroll_relative_p = FLOATP (Vautomatic_hscroll_step);
int hscroll_step_abs = 0;
double hscroll_step_rel = 0;
if (hscroll_relative_p)
{
! hscroll_step_rel = XFLOAT_DATA (Vautomatic_hscroll_step);
if (hscroll_step_rel < 0)
{
hscroll_relative_p = 0;
hscroll_step_abs = 0;
}
}
! else if (INTEGERP (Vautomatic_hscroll_step))
{
! hscroll_step_abs = XINT (Vautomatic_hscroll_step);
if (hscroll_step_abs < 0)
hscroll_step_abs = 0;
}
--- 8024,8045 ----
Lisp_Object window;
{
int hscrolled_p = 0;
! int hscroll_relative_p = FLOATP (Vhscroll_step);
int hscroll_step_abs = 0;
double hscroll_step_rel = 0;
if (hscroll_relative_p)
{
! hscroll_step_rel = XFLOAT_DATA (Vhscroll_step);
if (hscroll_step_rel < 0)
{
hscroll_relative_p = 0;
hscroll_step_abs = 0;
}
}
! else if (INTEGERP (Vhscroll_step))
{
! hscroll_step_abs = XINT (Vhscroll_step);
if (hscroll_step_abs < 0)
hscroll_step_abs = 0;
}
***************
*** 8056,8062 ****
hscrolled_p |= hscroll_window_tree (w->vchild);
else if (w->cursor.vpos >= 0)
{
! int hscroll_margin, text_area_x, text_area_y;
int text_area_width, text_area_height;
struct glyph_row *current_cursor_row
= MATRIX_ROW (w->current_matrix, w->cursor.vpos);
--- 8056,8062 ----
hscrolled_p |= hscroll_window_tree (w->vchild);
else if (w->cursor.vpos >= 0)
{
! int h_margin, text_area_x, text_area_y;
int text_area_width, text_area_height;
struct glyph_row *current_cursor_row
= MATRIX_ROW (w->current_matrix, w->cursor.vpos);
***************
*** 8071,8084 ****
&text_area_width, &text_area_height);
/* Scroll when cursor is inside this scroll margin. */
! hscroll_margin
! = automatic_hscroll_margin * CANON_X_UNIT (XFRAME (w->frame));
if ((XFASTINT (w->hscroll)
! && w->cursor.x <= hscroll_margin)
|| (cursor_row->enabled_p
&& cursor_row->truncated_on_right_p
! && (w->cursor.x >= text_area_width - hscroll_margin)))
{
struct it it;
int hscroll;
--- 8071,8083 ----
&text_area_width, &text_area_height);
/* Scroll when cursor is inside this scroll margin. */
! h_margin = hscroll_margin * CANON_X_UNIT (XFRAME (w->frame));
if ((XFASTINT (w->hscroll)
! && w->cursor.x <= h_margin)
|| (cursor_row->enabled_p
&& cursor_row->truncated_on_right_p
! && (w->cursor.x >= text_area_width - h_margin)))
{
struct it it;
int hscroll;
***************
*** 8110,8124 ****
if (!hscroll_relative_p && hscroll_step_abs == 0)
hscroll = max (0, it.current_x - text_area_width / 2)
/ CANON_X_UNIT (it.f);
! else if (w->cursor.x >= text_area_width - hscroll_margin)
{
if (hscroll_relative_p)
wanted_x = text_area_width * (1 - hscroll_step_rel)
! - hscroll_margin;
else
wanted_x = text_area_width
- hscroll_step_abs * CANON_X_UNIT (it.f)
! - hscroll_margin;
hscroll
= max (0, it.current_x - wanted_x) / CANON_X_UNIT (it.f);
}
--- 8109,8123 ----
if (!hscroll_relative_p && hscroll_step_abs == 0)
hscroll = max (0, it.current_x - text_area_width / 2)
/ CANON_X_UNIT (it.f);
! else if (w->cursor.x >= text_area_width - h_margin)
{
if (hscroll_relative_p)
wanted_x = text_area_width * (1 - hscroll_step_rel)
! - h_margin;
else
wanted_x = text_area_width
- hscroll_step_abs * CANON_X_UNIT (it.f)
! - h_margin;
hscroll
= max (0, it.current_x - wanted_x) / CANON_X_UNIT (it.f);
}
***************
*** 8126,8135 ****
{
if (hscroll_relative_p)
wanted_x = text_area_width * hscroll_step_rel
! + hscroll_margin;
else
wanted_x = hscroll_step_abs * CANON_X_UNIT (it.f)
! + hscroll_margin;
hscroll
= max (0, it.current_x - wanted_x) / CANON_X_UNIT (it.f);
}
--- 8125,8134 ----
{
if (hscroll_relative_p)
wanted_x = text_area_width * hscroll_step_rel
! + h_margin;
else
wanted_x = hscroll_step_abs * CANON_X_UNIT (it.f)
! + h_margin;
hscroll
= max (0, it.current_x - wanted_x) / CANON_X_UNIT (it.f);
}
***************
*** 15060,15075 ****
nil means don't display a cursor there. */);
cursor_in_non_selected_windows = 1;
! DEFVAR_BOOL ("automatic-hscrolling", &automatic_hscrolling_p,
doc: /* *Non-nil means scroll the display automatically to make point
visible. */);
automatic_hscrolling_p = 1;
! DEFVAR_INT ("automatic-hscroll-margin", &automatic_hscroll_margin,
doc: /* *How many columns away from the window edge point is allowed to
get
before automatic hscrolling will horizontally scroll the window. */);
! automatic_hscroll_margin = 5;
! DEFVAR_LISP ("automatic-hscroll-step", &Vautomatic_hscroll_step,
doc: /* *How many columns to scroll the window when point gets too close
to the edge.
When point is less than `automatic-hscroll-margin' columns from the window
edge, automatic hscrolling will scroll the window by the amount of columns
--- 15059,15074 ----
nil means don't display a cursor there. */);
cursor_in_non_selected_windows = 1;
! DEFVAR_BOOL ("auto-hscroll-mode", &automatic_hscrolling_p,
doc: /* *Non-nil means scroll the display automatically to make point
visible. */);
automatic_hscrolling_p = 1;
! DEFVAR_INT ("hscroll-margin", &hscroll_margin,
doc: /* *How many columns away from the window edge point is allowed to
get
before automatic hscrolling will horizontally scroll the window. */);
! hscroll_margin = 5;
! DEFVAR_LISP ("hscroll-step", &Vhscroll_step,
doc: /* *How many columns to scroll the window when point gets too close
to the edge.
When point is less than `automatic-hscroll-margin' columns from the window
edge, automatic hscrolling will scroll the window by the amount of columns
***************
*** 15085,15091 ****
Note that the lower bound for automatic hscrolling specified by `scroll-left'
and `scroll-right' overrides this variable's effect. */);
! Vautomatic_hscroll_step = make_number (0);
DEFVAR_LISP ("image-types", &Vimage_types,
doc: /* List of supported image types.
--- 15084,15090 ----
Note that the lower bound for automatic hscrolling specified by `scroll-left'
and `scroll-right' overrides this variable's effect. */);
! Vhscroll_step = make_number (0);
DEFVAR_LISP ("image-types", &Vimage_types,
doc: /* List of supported image types.
- [Emacs-diffs] Changes to emacs/src/xdisp.c,
Eli Zaretskii <=
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Richard M. Stallman, 2002/03/03
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Stefan Monnier, 2002/03/04
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Andreas Schwab, 2002/03/05
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Gerd Moellmann, 2002/03/06
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Gerd Moellmann, 2002/03/08
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Gerd Moellmann, 2002/03/08
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Gerd Moellmann, 2002/03/08
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Stefan Monnier, 2002/03/13
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Richard M. Stallman, 2002/03/16
- [Emacs-diffs] Changes to emacs/src/xdisp.c, Richard M. Stallman, 2002/03/17