changeset 28692:a22cc42e941d

(init_iterator): Set iterator's extra_line_spacing from buffer or frame. (automatic_hscrolling_p): New variable. (hscroll_windows): Scroll windows horizontally only if automatic hscrolling is allowed. (syms_of_xdisp): New variable `automatic-hscrolling'.
author Gerd Moellmann <gerd@gnu.org>
date Mon, 24 Apr 2000 13:57:11 +0000
parents 26fdeb2124f0
children 062f88e62612
files src/xdisp.c
diffstat 1 files changed, 29 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Mon Apr 24 13:56:30 2000 +0000
+++ b/src/xdisp.c	Mon Apr 24 13:57:11 2000 +0000
@@ -512,6 +512,11 @@
 int trace_redisplay_p;
 #endif
 
+/* Non-zero means automatically scroll windows horizontally to make
+   point visible.  */
+
+int automatic_hscrolling_p;
+
 /* Value returned from text property handlers (see below).  */
 
 enum prop_handled
@@ -1195,6 +1200,16 @@
   it->w = w;
   it->f = XFRAME (w->frame);
 
+  /* Extra space between lines (on window systems only).  */
+  if (base_face_id == DEFAULT_FACE_ID
+      && FRAME_WINDOW_P (it->f))
+    {
+      if (NATNUMP (current_buffer->extra_line_spacing))
+	it->extra_line_spacing = XFASTINT (current_buffer->extra_line_spacing);
+      else if (it->f->extra_line_spacing > 0)
+	it->extra_line_spacing = it->f->extra_line_spacing;
+    }
+
   /* If realized faces have been removed, e.g. because of face
      attribute changes of named faces, recompute them.  */
   if (FRAME_FACE_CACHE (it->f)->used == 0)
@@ -6913,9 +6928,16 @@
 hscroll_windows (window)
      Lisp_Object window;
 {
-  int hscrolled_p = hscroll_window_tree (window);
-  if (hscrolled_p)
-    clear_desired_matrices (XFRAME (WINDOW_FRAME (XWINDOW (window))));
+  int hscrolled_p;
+  
+  if (automatic_hscrolling_p)
+    {
+      hscrolled_p = hscroll_window_tree (window);
+      if (hscrolled_p)
+	clear_desired_matrices (XFRAME (WINDOW_FRAME (XWINDOW (window))));
+    }
+  else
+    hscrolled_p = 0;
   return hscrolled_p;
 }
 
@@ -13040,6 +13062,10 @@
     "*Non-nil means display a hollow cursor in non-selected windows.\n\
 Nil means don't display a cursor there.");
   cursor_in_non_selected_windows = 1;
+  
+  DEFVAR_BOOL ("automatic-hscrolling", &automatic_hscrolling_p,
+    "*Non-nil means scroll the display automatically to make point visible.");
+  automatic_hscrolling_p = 1;
 }