From: Gerd Moellmann Date: Mon, 24 Apr 2000 13:57:11 +0000 (+0000) Subject: (init_iterator): Set iterator's extra_line_spacing X-Git-Tag: emacs-pretest-21.0.90~4157 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d475bcb85400959316e8981afa5c3aed48ecd4bc;p=emacs.git (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'. --- 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; 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 @@ init_iterator (it, w, charpos, bytepos, row, base_face_id) 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 @@ static int 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 @@ If nil, don't resize."); "*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; }