From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.bugs Subject: bug#53776: Modeline indicator when using define-minor-mode Date: Mon, 07 Feb 2022 01:51:25 +0100 Message-ID: <87v8xr5wj6.fsf@web.de> References: <87v8xun5ss.fsf@rub.de> <2qvgePp1-X8z9KUXXka3Sv4Cy2yj9mgatR8NS8E2VIe1ijRsHK9FNYTgnDVa-5_B1eeSofCm97AnsdYunXTn41Yixq5Ecg_rD35upiG3oec=@protonmail.com> <87r18in49c.fsf@rub.de> <87iltsmzn9.fsf@web.de> <87tudc2m3n.fsf@gmx.net> <878run7jea.fsf@web.de> <87sfsvd1wc.fsf@rub.de> <874k5b7di4.fsf@web.de> <87mtj3cyfp.fsf@gmx.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32025"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 53776@debbugs.gnu.org, goncholden To: Stephen Berman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Feb 07 01:57:26 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nGsLO-0008C1-4N for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 07 Feb 2022 01:57:26 +0100 Original-Received: from localhost ([::1]:33222 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nGsLL-0004Bu-Sv for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 06 Feb 2022 19:57:24 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53060) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nGsGR-0002z8-Jl for bug-gnu-emacs@gnu.org; Sun, 06 Feb 2022 19:52:19 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46491) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nGsGA-0006So-S4 for bug-gnu-emacs@gnu.org; Sun, 06 Feb 2022 19:52:18 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nGsGA-0001qG-Qm for bug-gnu-emacs@gnu.org; Sun, 06 Feb 2022 19:52:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Heerdegen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 07 Feb 2022 00:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53776 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 53776-submit@debbugs.gnu.org id=B53776.16441950977041 (code B ref 53776); Mon, 07 Feb 2022 00:52:02 +0000 Original-Received: (at 53776) by debbugs.gnu.org; 7 Feb 2022 00:51:37 +0000 Original-Received: from localhost ([127.0.0.1]:40387 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nGsFk-0001pV-Tw for submit@debbugs.gnu.org; Sun, 06 Feb 2022 19:51:37 -0500 Original-Received: from mout.web.de ([212.227.17.11]:59893) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nGsFi-0001pH-Uz for 53776@debbugs.gnu.org; Sun, 06 Feb 2022 19:51:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1644195086; bh=INoK3C5a2hMBXfc4bsCbYdAY/Fi/cbF1C1klwWHjzIs=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=JvYMBE2cK1sOlhhrz/kQDeqAhfiATXtksFZxgkTGjWrdaZRRbKp4KJejy9aAF/QKY 0MlSR9tvlU9Ask4K/i4Jxr2V9Dec9C0kXnsJDT2EGQYkAoK3EY+cUO5u3YUyYHBpoP ubf1tSMjU/5OzHv5miPmEje6j1imnhh/M0Ajb6C4= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Original-Received: from drachen.dragon ([84.57.248.31]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MiuSs-1nviqg2iGK-00erUi; Mon, 07 Feb 2022 01:51:26 +0100 In-Reply-To: <87mtj3cyfp.fsf@gmx.net> (Stephen Berman's message of "Mon, 07 Feb 2022 01:28:26 +0100") X-Provags-ID: V03:K1:6rnN0Sn80E6twGOAmN9OyZTyIGxBM3UUQdVlMBXBY9vzxPnEIUJ kYsPpGJDtvt07fA8WsBFnfrVsjjO/6U9X6DErrbFh2r/i3DyeWBy5sg85ghzSpBNuMEFSZI ar/T4HO+lFof92S3PyabUTjaPokfpnIVyTTBMvJTXYih8JuERzmGjdmx2gjQVTt1wKX5cnN NoTfosV0kTdBL+DhAZ0Lg== X-UI-Out-Filterresults: notjunk:1;V03:K0:BhN4LwP7iWY=:CjloBEXOlHd7C0enzUH0+a 81A+9yFflgBCuNL7AoyEmY5kxRlQyGGaBMWjYxIdg/hwhhhpri40K3hjwbSHe0kEEqlYroiWc un2QdmikR27PPTcgtbR3HrPqFnDWMKs9KOZLcPZn7Eo/V35b4JTfewWbT116PsOhXP9zSzcU2 enr+BtMy6ICO15o4BSiEY1Ewh3yDdWegTll+Zz+ppEHhkOavuHWvnT6etAbdtW4Cso0QOV4Dg adR3NLluqwtnuLaKFzf4hnU2lU1rPZWEECLbve1bw6Jz8qH450n24C22m4LOsV/QAGvsMkOev HI3d+sUuFWOEBIfKRxBQtHh+8R14UQoMuwfJ7+lWp3FC2HJtd0O5ReF1VfiV4DLsMHp+ELjr4 lrepuNKTaskfvzPhUqjnXGDOyfxqq7I+ZRYrctBHAVf+KFMvMSFvdtOm50cE4j7JSXhPMfU/c UJkMcI2q8MaGqWt8pjI5DnUad//NkxxOcXnQITyj/8/C2scNcnooO6Ych+8KQVTROLVYSOQxB 8cnBf2xOu/maC56NuWFpSSpNvCnoWjb4ThxqbfsdK78mEkQLWkMc/VTBY+/NYlGcxATuN9ydJ HVmgcHN3nIoa3U3FyOJ59A1dXobd434RRLIF1Lort12NHYecQ05ZdH6oiTBX8Fmy+QGZC+upw GJuB7QyOpkGbGnCtof4VJPVoWCt1DQByVOEiokTTIOahd2aE0DgoPXwvLZhZ+h5dG8qIiBRyx +XiLgXzONyzCKQ2FToD+BKbBHh2/uA9PyFL6+a+LVkTsTDWRCih8+z76qo/LYGv3i8zcQm4l X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:226205 Archived-At: Stephen Berman writes: > Since I don't have mouse-4 and mouse-5 These are the "keys" associated with the mouse wheel. In case you want to scroll with the mouse wheel. > 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? I dunno how you want to scroll. Drag with mouse-1, scroll with a wheel or a key, something else? The code #+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 has to be evaluated once. Mode-line looks like before. (setq ml-scroll-amnt 3) scrolls the mode-line three chars to the left. (setq ml-scroll-amnt 0) to scroll back. Changing `ml-scroll-amnt' changes the scroll amount. How you implement changing the binding of `ml-scroll-amnt' is up to you, depends on how you want it to be. Scrolling to the right would only prepend space to the beginning, so I didn't handle negative `ml-scroll-amnt' values. Michael.