emacs-devel
[Top][All Lists]
Advanced

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

Re: Distinguishing: Temporary v. Semi-Permanent -- Horizontal Scrolling


From: Keith David Bershatsky
Subject: Re: Distinguishing: Temporary v. Semi-Permanent -- Horizontal Scrolling
Date: Mon, 02 Jul 2018 19:44:36 -0700

As far as I am aware, there are four (4) basic situations that I need to be 
aware of in terms of horizontal scrolling:

1a.  Temporary Horizontal Scrolling:  (scroll-left 1)
1b.  Current line is horizontally scrolled the same as all other lines.

2a.  Temporary Horizontal Scrolling:  (scroll-left 1)
2b.  Current line is horizontally scrolled _differently_ than all other lines.
2c.  Assumes (setq-local auto-hscroll-mode 'current-line)

3a.  Semi-permanent Horizontal Scrolling:  (scroll-left 1 t)
3b.  Current line is horizontally scrolled the same as all other lines.

4a.  Semi-permanent Horizontal Scrolling:  (scroll-left 1 t)
4b.  Current line is horizontally scrolled _differently_ than all other lines.
4c.  Assumes (setq-local auto-hscroll-mode 'current-line)

In a previous post, you taught me that (it->w->min_hscroll > 0) tells us that 
semi-permanent horizontal scrolling is in effect.

I have been using the following hscl test for the 2nd situation above:

  bool hscl = (!it->w->suspend_auto_hscroll
               && EQ (Fbuffer_local_value (Qauto_hscroll_mode, buf), 
Qcurrent_line)
               && it->w->hscroll > 0);

The hscl test is _true_ for the 2nd, 3rd and 4th situations above.  Thus, the 
hscl test does not help us distinguish between the 3rd and 4th situations above.

Q:  In addition to (it->w->min_hscroll > 0), what test will help us distinguish 
between the 3rd and 4th situations above?



reply via email to

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