[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/keycast a3a0798349 25/31: Explicitly support compact mode
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/keycast a3a0798349 25/31: Explicitly support compact mode line |
Date: |
Sun, 9 Jan 2022 05:58:51 -0500 (EST) |
branch: elpa/keycast
commit a3a0798349adf3e33277091fa8dee63173b68edf
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
Explicitly support compact mode line
By default the key is displayed with padding and a [box]:
[ C-n ] next-line
but if `mode-line-compact' is non-nil, then that became:
[C-n ]next-line
and now that we handle it explicitly, we get:
[C-n] next-line
Closes #13.
---
keycast.el | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/keycast.el b/keycast.el
index 57742c8a52..714c402e57 100644
--- a/keycast.el
+++ b/keycast.el
@@ -230,9 +230,12 @@ instead."
(unless (eq k t) (setq key k))
(unless (eq c t) (setq cmd c))))
(and key cmd
- (let ((k (let ((pad (max 2 (- 5 (length key)))))
- (concat (make-string (ceiling pad 2) ?\s) key
- (make-string (floor pad 2) ?\s))))
+ (let ((k (if (and (bound-and-true-p mode-line-compact)
+ (eq format mode-line-keycast-format))
+ key
+ (let ((pad (max 2 (- 5 (length key)))))
+ (concat (make-string (ceiling pad 2) ?\s) key
+ (make-string (floor pad 2) ?\s)))))
(c (format " %s" cmd)))
(format-spec
format
- [nongnu] elpa/keycast 3beccc4789 26/31: Load compile-time dependencies for older Emacsen, (continued)
- [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
- [nongnu] elpa/keycast 08c0e999ac 22/31: keycast--read-passwd: Move definition, ELPA Syncer, 2022/01/09
- [nongnu] elpa/keycast a3a0798349 25/31: Explicitly support compact mode line,
ELPA Syncer <=
- [nongnu] elpa/keycast 038475c178 15/31: mode-line-keycast-format: New variable, ELPA Syncer, 2022/01/09
- [nongnu] elpa/keycast eecef23534 23/31: Use this-single-command-keys, ELPA Syncer, 2022/01/09
- [nongnu] elpa/keycast a12ef1fb48 28/31: Add SPDX-License-Identifier library header, ELPA Syncer, 2022/01/09
- [nongnu] elpa/keycast c855511785 04/31: Insert `mode-line-keycast` into `mode-line-format` before `(cdr cons)`, ELPA Syncer, 2022/01/09
- [nongnu] elpa/keycast fe416461b1 07/31: keycast-mode: Add usage hint to error message, ELPA Syncer, 2022/01/09
- [nongnu] elpa/keycast e635c7fbe4 19/31: keycast--format: Don't pad %K, ELPA Syncer, 2022/01/09
- [nongnu] elpa/keycast 6d75f149a7 20/31: keycast--update: New name for keycast-mode-line-update, ELPA Syncer, 2022/01/09
- [nongnu] elpa/keycast 3a8c4db51a 21/31: keycast-log-mode: New mode, ELPA Syncer, 2022/01/09
- [nongnu] elpa/keycast 04ba7519f3 29/31: Use keycast--tree-member when disabling keycast-mode as well, ELPA Syncer, 2022/01/09
- [nongnu] elpa/keycast 2c94648442 30/31: Fix keycast-log-mode breakage when reading a password, ELPA Syncer, 2022/01/09