[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/transient cda6a12042 342/366: transient-align-variable-
From: |
Jonas Bernoulli |
Subject: |
[elpa] externals/transient cda6a12042 342/366: transient-align-variable-pitch: New option |
Date: |
Tue, 25 Jan 2022 18:54:53 -0500 (EST) |
branch: externals/transient
commit cda6a12042653b5a5642b9a72332c92fd16ba4f4
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
transient-align-variable-pitch: New option
---
docs/transient.org | 14 ++++++++++++++
lisp/transient.el | 33 +++++++++++++++++++++++++++------
2 files changed, 41 insertions(+), 6 deletions(-)
diff --git a/docs/transient.org b/docs/transient.org
index 304e003609..a6f7009ad6 100644
--- a/docs/transient.org
+++ b/docs/transient.org
@@ -661,6 +661,20 @@ Also see [[* Common Suffix Commands]].
This option controls whether the transient buffer is hidden while
user input is being read in the minibuffer.
+- User Option: transient-align-variable-pitch ::
+
+ This option controls whether columns are align pixel-wise in the
+ popup buffer.
+
+ If this is non-nil, then columns are aligned pixel-wise to support
+ variable-pitch fonts. Keys are not aligned, so you should use a
+ fixed-pitch font for the ~transient-key~ face. Other key faces
+ inherit from that face unless a theme is used that breaks that
+ relationship.
+
+ This option is intended for users who use a variable-pitch font for
+ the ~default~ face.
+
- User Option: transient-force-fixed-pitch ::
This option controls whether to force the use of a monospaced font
diff --git a/lisp/transient.el b/lisp/transient.el
index ad6bb74cb0..e84da4494f 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -317,13 +317,32 @@ used."
:group 'transient
:type 'boolean)
+(defcustom transient-align-variable-pitch nil
+ "Whether to align columns pixel-wise in the popup buffer.
+
+If this is non-nil, then columns are aligned pixel-wise to
+support variable-pitch fonts. Keys are not aligned, so you
+should use a fixed-pitch font for the `transient-key' face.
+Other key faces inherit from that face unless a theme is
+used that breaks that relationship.
+
+This option is intended for users who use a variable-pitch
+font for the `default' face.
+
+Also see `transient-force-fixed-pitch'."
+ :package-version '(transient . "0.4.0")
+ :group 'transient
+ :type 'boolean)
+
(defcustom transient-force-fixed-pitch nil
"Whether to force use of monospaced font in the popup buffer.
Even if you use a proportional font for the `default' face,
you might still want to use a monospaced font in transient's
popup buffer. Setting this option to t causes `default' to
-be remapped to `fixed-pitch' in that buffer."
+be remapped to `fixed-pitch' in that buffer.
+
+Also see `transient-align-variable-pitch'."
:package-version '(transient . "0.2.0")
:group 'transient
:type 'boolean)
@@ -451,7 +470,7 @@ give you as many additional suffixes as you hoped.)"
"Face used for the infix for which the value is being read."
:group 'transient-faces)
-(defface transient-unreachable-key '((t :inherit shadow))
+(defface transient-unreachable-key '((t :inherit (transient-key shadow)))
"Face used for keys unreachable from the current prefix sequence."
:group 'transient-faces)
@@ -3139,7 +3158,8 @@ have a history of their own.")
(push desc rows))
rows))
(oref group suffixes)))
- (vp (oref transient--prefix variable-pitch))
+ (vp (or (oref transient--prefix variable-pitch)
+ transient-align-variable-pitch))
(rs (apply #'max (mapcar #'length columns)))
(cs (length columns))
(cw (mapcar (lambda (col)
@@ -3287,12 +3307,13 @@ Optional support for popup buttons is also implemented
here."
(unless (string-match-p " " key)
(setq pre (replace-regexp-in-string " " "" pre))
(setq suf (replace-regexp-in-string " " "" suf)))
- (concat (propertize pre 'face 'default)
+ (concat (propertize pre 'face 'transient-unreachable-key)
(and (string-prefix-p (concat pre " ") key) " ")
(transient--colorize-key suf cmd)
(save-excursion
- (when (string-match " +\\'" key)
- (match-string 0 key))))))
+ (and (string-match " +\\'" key)
+ (propertize (match-string 0 key)
+ 'face 'fixed-pitch))))))
((transient--lookup-key transient-sticky-map (kbd key))
(transient--colorize-key key cmd))
(t
- [elpa] externals/transient e77d16dd02 322/366: transient--post-command: Avoid needlessly recreating redisplay map, (continued)
- [elpa] externals/transient e77d16dd02 322/366: transient--post-command: Avoid needlessly recreating redisplay map, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 7b8a7d718a 327/366: Use a more targeted approach to suspending transient override, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 3c78b10f52 333/366: transient--redisplay: Don't redisplay during mouse-drag-region, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient bf29731a72 332/366: transient--post-command: Don't pop and push equal redisplay maps, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 777a84d26b 339/366: manual: Document all options, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient c19ff84355 338/366: manual: Rearrange and group options, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 9412f26175 356/366: manual: Use more @itemx, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 3de8d9b256 357/366: manual: Fix list item, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient ecb815bcae 353/366: transient--abort-commands: Add keyboard-escape-quit, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 686b7ebc5f 363/366: Fix handling of sub-prefix command that use the minibuffer, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient cda6a12042 342/366: transient-align-variable-pitch: New option,
Jonas Bernoulli <=
- [elpa] externals/transient a19faa1c71 364/366: Return to outer prefix when minibuffer is aborted for sub-prefix, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 994616d92f 365/366: manual: Fix version macro and prefer PACKAGE_REVDESC, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 3b4202e8ca 358/366: Silence byte-compiler, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient e85b3e5241 007/366: manual: Fix a typo, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient b155eec353 011/366: transient--suffix-command: Fix doc-string typos, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient ebbe32e14d 028/366: transient--insert-groups: New function, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 70729dd620 043/366: transient-set-level: Disallow 0 as prefix level, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 3668aeb81d 053/366: transient--history-key: New generic function, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient e627d45166 054/366: transient-prefix: Add new history-key slot, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 8a0428e037 056/366: transient-args: Remove unnecessary form, Jonas Bernoulli, 2022/01/25