bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#53776: Modeline indicator when using define-minor-mode


From: Stephen Berman
Subject: bug#53776: Modeline indicator when using define-minor-mode
Date: Mon, 07 Feb 2022 01:28:26 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

On Mon, 07 Feb 2022 00:59:31 +0100 Michael Heerdegen <michael_heerdegen@web.de> 
wrote:

> Stephen Berman <stephen.berman@gmx.net> writes:
>
>> > #+begin_src emacs-lisp
>> > (defvar ml-scroll-amnt 0)
>> >
>> > (setq-default
>> >  mode-line-format
>> >  `(:eval (substring (format-mode-line ',mode-line-format)
>> >                     ml-scroll-amnt)))
>> > #+end_src
>> >
>> > and let mouse-4 and mouse-5 over the mode-line de- and increase
>> > `ml-scroll-amnt'.  That's all.
>>
>> Thanks, but doesn't this just truncate the mode-line-string
>> continuously?  For scrolling back, it seems necessary to store the
>> original mode-line-string and concatenate the previously truncated part
>> of it with the current value.
>
> No, you just have to change the value of `ml-scroll-amnt'.  Try it.
> That piece of code doesn't work as you describe.

Since I don't have mouse-4 and mouse-5, I just tried evaluating that
sexp with integral values (1, 0, -1) for ml-scroll-amnt, and only got
truncation.  Maybe I don't understand what you mean by "let mouse-4 and
mouse-5 over the mode-line de- and increase `ml-scroll-amnt'".  Can you
show me bindings I can try with a 3-button mouse, or just with the
keyboard?

Steve Berman





reply via email to

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