[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/keycast 44f53d7cc6 10/31: Limit updating of mode-line
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/keycast 44f53d7cc6 10/31: Limit updating of mode-line |
Date: |
Sun, 9 Jan 2022 05:58:39 -0500 (EST) |
branch: elpa/keycast
commit 44f53d7cc62342d48fcba4d555ab204c8d7e482a
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
Limit updating of mode-line
Merely loading the library resulted in `keycast-mode-line-update'
being added to `pre-command-hook', which was clearly unnecessary.
Now the mode `keycast-mode' controls whether the hook function is
used.
Additionally only update the mode-line of the current buffer, by
calling `forge-mode-line-update' without the ALL argument.
The purpose of these changes isn't merely to reduce waste. Forcing
all mode-lines to be updated causes `old-selected-window' to return
a different value, which causes issues for moody when the user moves
away from the still active minibuffer.
---
keycast.el | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/keycast.el b/keycast.el
index 23aca2f59c..2c3b6b3108 100644
--- a/keycast.el
+++ b/keycast.el
@@ -160,9 +160,7 @@ instead."
;; values have been reset to nil.
(setq keycast--this-command-keys (this-command-keys))
(setq keycast--this-command this-command)
- (force-mode-line-update t))
-
-(add-hook 'pre-command-hook 'keycast-mode-line-update t)
+ (force-mode-line-update))
(defvar keycast--removed-tail nil)
@@ -182,7 +180,8 @@ instead."
(setq keycast--removed-tail (cdr cons))
(setcdr cons (list 'mode-line-keycast)))
(t
- (setcdr cons (cons 'mode-line-keycast (cdr cons))))))
+ (setcdr cons (cons 'mode-line-keycast (cdr cons)))))
+ (add-hook 'pre-command-hook 'keycast-mode-line-update t))
(let ((cons (memq 'mode-line-keycast mode-line-format)))
(cond (keycast--removed-tail
(setcar cons (car keycast--removed-tail))
@@ -190,7 +189,8 @@ instead."
(t
(setcar cons (cadr cons))
(setcdr cons (cddr cons)))))
- (setq keycast--removed-tail nil)))
+ (setq keycast--removed-tail nil)
+ (remove-hook 'pre-command-hook 'keycast-mode-line-update)))
(defun keycast-bottom-right-window-p ()
(and (window-at-side-p nil 'right)
- [nongnu] branch elpa/keycast created (now a5257bca3d), ELPA Syncer, 2022/01/09
- [nongnu] elpa/keycast b7ef571043 11/31: Fix typo, ELPA Syncer, 2022/01/09
- [nongnu] elpa/keycast 8970a30273 12/31: Revert "Add .github/FUNDING.yml", ELPA Syncer, 2022/01/09
- [nongnu] elpa/keycast c64742ee21 01/31: Initial import, ELPA Syncer, 2022/01/09
- [nongnu] elpa/keycast 16d9961d15 16/31: Add format-spec requirement, ELPA Syncer, 2022/01/09
- [nongnu] elpa/keycast 464bae181f 05/31: Show counter if a command is invoked more than once in a row, ELPA Syncer, 2022/01/09
- [nongnu] elpa/keycast 7c45ff05c1 06/31: Fix typo in doc-string, ELPA Syncer, 2022/01/09
- [nongnu] elpa/keycast cf475dcb5a 18/31: keycast--format: New function, ELPA Syncer, 2022/01/09
- [nongnu] elpa/keycast 7bbebe6442 08/31: Add .github/FUNDING.yml, ELPA Syncer, 2022/01/09
- [nongnu] elpa/keycast 44f53d7cc6 10/31: Limit updating of mode-line,
ELPA Syncer <=
- [nongnu] elpa/keycast b02892ec77 24/31: Show only type for non-symbol bindings, ELPA Syncer, 2022/01/09
- [nongnu] elpa/keycast 3beccc4789 26/31: Load compile-time dependencies for older Emacsen, ELPA Syncer, 2022/01/09
- [nongnu] elpa/keycast a5257bca3d 31/31: Release version 1.1.2, ELPA Syncer, 2022/01/09
- [nongnu] elpa/keycast d54a8ebc08 27/31: Restore updating while in minibuffer, ELPA Syncer, 2022/01/09
- [nongnu] elpa/keycast 0d28c26b07 02/31: Fix typo, ELPA Syncer, 2022/01/09
- [nongnu] elpa/keycast 46370b8a72 03/31: Change screenshot url, ELPA Syncer, 2022/01/09
- [nongnu] elpa/keycast adb55497c0 13/31: Bump copyright years, ELPA Syncer, 2022/01/09
- [nongnu] elpa/keycast ab41be43b6 09/31: Suppress output while reading password, ELPA Syncer, 2022/01/09
- [nongnu] elpa/keycast a912c4db1b 14/31: Locate keycast-insert-after anywhere in mode-line-format, ELPA Syncer, 2022/01/09
- [nongnu] elpa/keycast 032a51c3c4 17/31: Fix two doc-string typos, ELPA Syncer, 2022/01/09