emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/xdisp.c,v


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/src/xdisp.c,v
Date: Sat, 19 Jan 2008 05:22:34 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        08/01/19 05:22:34

Index: xdisp.c
===================================================================
RCS file: /sources/emacs/emacs/src/xdisp.c,v
retrieving revision 1.1177
retrieving revision 1.1178
diff -u -b -r1.1177 -r1.1178
--- xdisp.c     13 Jan 2008 00:43:52 -0000      1.1177
+++ xdisp.c     19 Jan 2008 05:22:33 -0000      1.1178
@@ -689,6 +689,7 @@
    point visible.  */
 
 int automatic_hscrolling_p;
+Lisp_Object Qauto_hscroll_mode;
 
 /* How close to the margin can point get before the window is scrolled
    horizontally.  */
@@ -10381,11 +10382,12 @@
          /* Scroll when cursor is inside this scroll margin.  */
          h_margin = hscroll_margin * WINDOW_FRAME_COLUMN_WIDTH (w);
 
-         if ((XFASTINT (w->hscroll)
+         if (!NILP (Fbuffer_local_value (Qauto_hscroll_mode, w->buffer))
+             && ((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)))
+                     && (w->cursor.x >= text_area_width - h_margin))))
            {
              struct it it;
              int hscroll;
@@ -10475,16 +10477,9 @@
 hscroll_windows (window)
      Lisp_Object window;
 {
-  int hscrolled_p;
-
-  if (automatic_hscrolling_p)
-    {
-      hscrolled_p = hscroll_window_tree (window);
+  int hscrolled_p = hscroll_window_tree (window);
       if (hscrolled_p)
        clear_desired_matrices (XFRAME (WINDOW_FRAME (XWINDOW (window))));
-    }
-  else
-    hscrolled_p = 0;
   return hscrolled_p;
 }
 
@@ -24387,6 +24382,8 @@
   DEFVAR_BOOL ("auto-hscroll-mode", &automatic_hscrolling_p,
     doc: /* *Non-nil means scroll the display automatically to make point 
visible.  */);
   automatic_hscrolling_p = 1;
+  Qauto_hscroll_mode = intern ("auto-hscroll-mode");
+  staticpro (&Qauto_hscroll_mode);
 
   DEFVAR_INT ("hscroll-margin", &hscroll_margin,
     doc: /* *How many columns away from the window edge point is allowed to get




reply via email to

[Prev in Thread] Current Thread [Next in Thread]