aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c32
1 files changed, 29 insertions, 3 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 061a0c8cab8..ef9add8af44 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -512,6 +512,11 @@ static int last_max_ascent, last_height;
512int trace_redisplay_p; 512int trace_redisplay_p;
513#endif 513#endif
514 514
515/* Non-zero means automatically scroll windows horizontally to make
516 point visible. */
517
518int automatic_hscrolling_p;
519
515/* Value returned from text property handlers (see below). */ 520/* Value returned from text property handlers (see below). */
516 521
517enum prop_handled 522enum prop_handled
@@ -1195,6 +1200,16 @@ init_iterator (it, w, charpos, bytepos, row, base_face_id)
1195 it->w = w; 1200 it->w = w;
1196 it->f = XFRAME (w->frame); 1201 it->f = XFRAME (w->frame);
1197 1202
1203 /* Extra space between lines (on window systems only). */
1204 if (base_face_id == DEFAULT_FACE_ID
1205 && FRAME_WINDOW_P (it->f))
1206 {
1207 if (NATNUMP (current_buffer->extra_line_spacing))
1208 it->extra_line_spacing = XFASTINT (current_buffer->extra_line_spacing);
1209 else if (it->f->extra_line_spacing > 0)
1210 it->extra_line_spacing = it->f->extra_line_spacing;
1211 }
1212
1198 /* If realized faces have been removed, e.g. because of face 1213 /* If realized faces have been removed, e.g. because of face
1199 attribute changes of named faces, recompute them. */ 1214 attribute changes of named faces, recompute them. */
1200 if (FRAME_FACE_CACHE (it->f)->used == 0) 1215 if (FRAME_FACE_CACHE (it->f)->used == 0)
@@ -6913,9 +6928,16 @@ static int
6913hscroll_windows (window) 6928hscroll_windows (window)
6914 Lisp_Object window; 6929 Lisp_Object window;
6915{ 6930{
6916 int hscrolled_p = hscroll_window_tree (window); 6931 int hscrolled_p;
6917 if (hscrolled_p) 6932
6918 clear_desired_matrices (XFRAME (WINDOW_FRAME (XWINDOW (window)))); 6933 if (automatic_hscrolling_p)
6934 {
6935 hscrolled_p = hscroll_window_tree (window);
6936 if (hscrolled_p)
6937 clear_desired_matrices (XFRAME (WINDOW_FRAME (XWINDOW (window))));
6938 }
6939 else
6940 hscrolled_p = 0;
6919 return hscrolled_p; 6941 return hscrolled_p;
6920} 6942}
6921 6943
@@ -13040,6 +13062,10 @@ If nil, don't resize.");
13040 "*Non-nil means display a hollow cursor in non-selected windows.\n\ 13062 "*Non-nil means display a hollow cursor in non-selected windows.\n\
13041Nil means don't display a cursor there."); 13063Nil means don't display a cursor there.");
13042 cursor_in_non_selected_windows = 1; 13064 cursor_in_non_selected_windows = 1;
13065
13066 DEFVAR_BOOL ("automatic-hscrolling", &automatic_hscrolling_p,
13067 "*Non-nil means scroll the display automatically to make point visible.");
13068 automatic_hscrolling_p = 1;
13043} 13069}
13044 13070
13045 13071