GNU bug report logs - #53776
Modeline indicator when using define-minor-mode

Previous Next

Package: emacs;

Reported by: goncholden <goncholden <at> protonmail.com>

Date: Fri, 4 Feb 2022 11:56:01 UTC

Severity: wishlist

Tags: notabug

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: 53776 <at> debbugs.gnu.org, goncholden <goncholden <at> protonmail.com>
Subject: bug#53776: Modeline indicator when using define-minor-mode
Date: Mon, 07 Feb 2022 00:59:31 +0100
Stephen Berman <stephen.berman <at> 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.

Michael.




This bug report was last modified 3 years and 104 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.