[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/keycast 38a09aa5e3 03/10: keycast-mode-line-mode: Cosmetic
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/keycast 38a09aa5e3 03/10: keycast-mode-line-mode: Cosmetics |
Date: |
Mon, 5 Dec 2022 06:59:11 -0500 (EST) |
branch: elpa/keycast
commit 38a09aa5e3c9e2080a1b33f52919bf6b05edfed9
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
keycast-mode-line-mode: Cosmetics
---
keycast.el | 35 +++++++++++++++++++----------------
1 file changed, 19 insertions(+), 16 deletions(-)
diff --git a/keycast.el b/keycast.el
index 57f1d4e98a..d6b5a38c2a 100644
--- a/keycast.el
+++ b/keycast.el
@@ -399,21 +399,24 @@ t to show the actual COMMAND, or a symbol to be shown
instead."
(define-minor-mode keycast-mode-line-mode
"Show current command and its key binding in the mode line."
:global t
- (if keycast-mode-line-mode
- (let ((cons (keycast--tree-member keycast-mode-line-insert-after
mode-line-format)))
- (unless cons
- (setq keycast-mode-line-mode nil)
- (user-error
- "Cannot turn on %s. %s not found in %s. Try customizing %s."
- 'keycast-mode-line-mode keycast-mode-line-insert-after
- 'mode-line-format 'keycast-mode-line-insert-after))
- (cond (keycast-mode-line-remove-tail-elements
- (setq keycast--removed-tail (cdr cons))
- (setcdr cons (list 'keycast-mode-line)))
- (t
- (setcdr cons (cons 'keycast-mode-line (cdr cons)))))
- (add-hook 'post-command-hook #'keycast--update t)
- (add-hook 'minibuffer-exit-hook #'keycast--minibuffer-exit t))
+ (cond
+ (keycast-mode-line-mode
+ (let ((cons (keycast--tree-member keycast-mode-line-insert-after
+ mode-line-format)))
+ (unless cons
+ (setq keycast-mode-line-mode nil)
+ (user-error
+ "Cannot turn on %s. %s not found in %s. Try customizing %s."
+ 'keycast-mode-line-mode keycast-mode-line-insert-after
+ 'mode-line-format 'keycast-mode-line-insert-after))
+ (cond (keycast-mode-line-remove-tail-elements
+ (setq keycast--removed-tail (cdr cons))
+ (setcdr cons (list 'keycast-mode-line)))
+ (t
+ (setcdr cons (cons 'keycast-mode-line (cdr cons)))))
+ (add-hook 'post-command-hook #'keycast--update t)
+ (add-hook 'minibuffer-exit-hook #'keycast--minibuffer-exit t)))
+ (t
(let ((cons (keycast--tree-member 'keycast-mode-line mode-line-format)))
(cond (keycast--removed-tail
(setcar cons (car keycast--removed-tail))
@@ -424,7 +427,7 @@ t to show the actual COMMAND, or a symbol to be shown
instead."
(setq keycast--removed-tail nil)
(unless (keycast--mode-active-p)
(remove-hook 'post-command-hook #'keycast--update)
- (remove-hook 'minibuffer-exit-hook #'keycast--minibuffer-exit))))
+ (remove-hook 'minibuffer-exit-hook #'keycast--minibuffer-exit)))))
(defun keycast--tree-member (elt tree)
(or (member elt tree)
- [nongnu] elpa/keycast updated (92a14313fe -> 53514c3dc3), ELPA Syncer, 2022/12/05
- [nongnu] elpa/keycast 36d7bfa75f 09/10: keycast-header-line-mode: New mode, ELPA Syncer, 2022/12/05
- [nongnu] elpa/keycast 81bad0faa8 08/10: keycast--tree-member: Move definition, ELPA Syncer, 2022/12/05
- [nongnu] elpa/keycast 860b0781a4 05/10: keycast-mode-line-mode: Support atomic and void global mode-line-format, ELPA Syncer, 2022/12/05
- [nongnu] elpa/keycast 1c92a5daf5 02/10: Rename keycast-mode to keycast-mode-line-mode, ELPA Syncer, 2022/12/05
- [nongnu] elpa/keycast f87f9c965e 06/10: keycast-mode-line-mode: Support buffers with local mode-line-format, ELPA Syncer, 2022/12/05
- [nongnu] elpa/keycast 3df44bd9e7 04/10: keycast-mode-line-mode: Make sure to modify global mode-line-format, ELPA Syncer, 2022/12/05
- [nongnu] elpa/keycast 53514c3dc3 10/10: Update documentation, ELPA Syncer, 2022/12/05
- [nongnu] elpa/keycast 31446ad19c 01/10: Split Options section into subsections, ELPA Syncer, 2022/12/05
- [nongnu] elpa/keycast 3367c7d375 07/10: keycast--removed-tail: Rename to keycast--header-line-removed-tail, ELPA Syncer, 2022/12/05
- [nongnu] elpa/keycast 38a09aa5e3 03/10: keycast-mode-line-mode: Cosmetics,
ELPA Syncer <=