[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/transient 427e36046a 131/366: transient-force-fixed-pit
From: |
Jonas Bernoulli |
Subject: |
[elpa] externals/transient 427e36046a 131/366: transient-force-fixed-pitch: New option |
Date: |
Tue, 25 Jan 2022 18:54:33 -0500 (EST) |
branch: externals/transient
commit 427e36046a288f60e318d8b1e5b5c45e8a1a3062
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
transient-force-fixed-pitch: New option
Re #25. Closes #67.
---
docs/CHANGELOG | 4 ++++
docs/transient.org | 12 ++++++++++--
docs/transient.texi | 13 +++++++++++--
lisp/transient.el | 20 +++++++++++++++++++-
4 files changed, 44 insertions(+), 5 deletions(-)
diff --git a/docs/CHANGELOG b/docs/CHANGELOG
index bf7e4f5fa5..ee0b90fffb 100644
--- a/docs/CHANGELOG
+++ b/docs/CHANGELOG
@@ -11,6 +11,10 @@
non-standard value for ~transient-display-buffer-action~ it may
be necessary to do that. #17
+- The new option ~transient-force-fixed-pitch~ allows users to use a
+ monospaced font in transient's popup buffer even if they use a
+ proportional font for the rest of Emacs. #25, #67
+
- Added new commands ~transient-scroll-up~ and ~transient-scroll-down~,
which scroll the transient window. ~C-v~ and ~M-v~ (and ~<next>~ and
~<prior>~) are bound to these commands. These keys were chosen they
diff --git a/docs/transient.org b/docs/transient.org
index 590aa1cb9a..01d4cd641c 100644
--- a/docs/transient.org
+++ b/docs/transient.org
@@ -8,7 +8,7 @@
#+TEXINFO_DIR_CATEGORY: Emacs
#+TEXINFO_DIR_TITLE: Transient: (transient).
#+TEXINFO_DIR_DESC: Transient Commands
-#+SUBTITLE: for version 0.1.0 (v0.1.0-115-gad7f255+1)
+#+SUBTITLE: for version 0.1.0 (v0.1.0-129-gc1ae1ee+1)
#+TEXINFO_DEFFN: t
#+OPTIONS: H:4 num:4 toc:2
@@ -37,7 +37,7 @@ Calling a suffix command usually causes the transient to be
exited
but suffix commands can also be configured to not exit the transient.
#+TEXINFO: @noindent
-This manual is for Transient version 0.1.0 (v0.1.0-115-gad7f255+1).
+This manual is for Transient version 0.1.0 (v0.1.0-129-gc1ae1ee+1).
#+BEGIN_QUOTE
Copyright (C) 2018-2019 Jonas Bernoulli <jonas@bernoul.li>
@@ -617,6 +617,14 @@ window, and the key bindings are the same as for
~scroll-up-command~ and
predicates of those suffixes prevent that more than one of them is
enabled at a time.
+- User Option: transient-force-fixed-pitch
+
+ This option controls whether to force the use of a monospaced font
+ in 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.
+
* Modifying Existing Transients
To an extent transients can be customized interactively, see [[*Enabling
diff --git a/docs/transient.texi b/docs/transient.texi
index d61ec31954..ac13e8fc32 100644
--- a/docs/transient.texi
+++ b/docs/transient.texi
@@ -31,7 +31,7 @@ General Public License for more details.
@finalout
@titlepage
@title Transient User and Developer Manual
-@subtitle for version 0.1.0 (v0.1.0-115-gad7f255+1)
+@subtitle for version 0.1.0 (v0.1.0-129-gc1ae1ee+1)
@author Jonas Bernoulli
@page
@vskip 0pt plus 1filll
@@ -65,7 +65,7 @@ Calling a suffix command usually causes the transient to be
exited
but suffix commands can also be configured to not exit the transient.
@noindent
-This manual is for Transient version 0.1.0 (v0.1.0-115-gad7f255+1).
+This manual is for Transient version 0.1.0 (v0.1.0-129-gc1ae1ee+1).
@quotation
Copyright (C) 2018-2019 Jonas Bernoulli <jonas@@bernoul.li>
@@ -808,6 +808,15 @@ predicates of those suffixes prevent that more than one of
them is
enabled at a time.
@end defopt
+@defopt transient-force-fixed-pitch
+
+This option controls whether to force the use of a monospaced font
+in popup buffer. Even if you use a proportional font for the
+@code{default} face, you might still want to use a monospaced font in
+transient's popup buffer. Setting this option to t causes @code{default}
+to be remapped to @code{fixed-pitch} in that buffer.
+@end defopt
+
@node Modifying Existing Transients
@chapter Modifying Existing Transients
diff --git a/lisp/transient.el b/lisp/transient.el
index f76ca8dba2..148e84354b 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -230,6 +230,17 @@ used."
:group 'transient
:type 'boolean)
+(defcustom transient-force-fixed-pitch nil
+ "Whether to force used of monospaced font in 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."
+ :package-version '(transient . "0.2.0")
+ :group 'transient
+ :type 'boolean)
+
(defcustom transient-default-level 4
"Control what suffix levels are made available by default.
@@ -2529,6 +2540,8 @@ have a history of their own.")
(window-size-fixed nil))
(fit-window-to-buffer nil nil 1))
(goto-char (point-min))
+ (when transient-force-fixed-pitch
+ (transient--force-fixed-pitch))
(when transient-enable-popup-navigation
(transient--goto-button focus)))))
@@ -3085,7 +3098,7 @@ search instead."
(or (memq this-command '(top-level abort-recursive-edit))
(string-prefix-p "edebug" (symbol-name this-command)))))
-;;;; Other Packages
+;;;; Miscellaneous
(declare-function which-key-mode "which-key" (&optional arg))
@@ -3129,6 +3142,11 @@ we stop there."
((string-equal key "Q") "M-q")
(t key))))
+(defun transient--force-fixed-pitch ()
+ (require 'face-remap)
+ (face-remap-reset-base 'default)
+ (face-remap-add-relative 'default 'fixed-pitch))
+
;;;; Missing from Emacs
(defun transient--seq-reductions-from (function sequence initial-value)
- [elpa] externals/transient 51c50d8c82 319/366: manual: Use updated support for definition commands, (continued)
- [elpa] externals/transient 51c50d8c82 319/366: manual: Use updated support for definition commands, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 2e33f96cf0 326/366: transient--post-command: Cosmetics, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 76b77e01ac 328/366: magit--{pre, post}-command: Add emergency exits, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 41521a5c93 331/366: transient--get-predicate-for: Always return a function, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 69f42f9e89 334/366: transient--make-predicate-map: Cosmetics, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 8d8ed1965f 345/366: Hide infix commands from execute-extended-command, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 22e032ae65 343/366: Move obsolete variable declaration, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 804feb3b41 361/366: transient--{push, pop}-keymap: Do nothing if keymap is void, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 6d721f7490 348/366: Don't use convert-standard-filename when defining path variables, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 2c9cef1f5a 352/366: Bump copyright years, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 427e36046a 131/366: transient-force-fixed-pitch: New option,
Jonas Bernoulli <=
- [elpa] externals/transient 95389b31ec 137/366: transient-init-value: Always prefer saved over default value, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 700719723d 047/366: magit--history-push: Add optional SLOT argument, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 919fc6653d 048/366: transient--make-predicate-map: Always respect transient slot, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 93b5088ffd 050/366: Highlight the active infix while reading its value from the user, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 32459a4dde 074/366: Bring back arrow key navigation in transient popups, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 23fab3a114 075/366: Bring back mouse support in transient popups, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient b52c9652fa 077/366: Update manual, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient dcf7a4dc62 084/366: transient-read-with-initial-input: New option, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient fd9e9bfe26 088/366: transient--layout-member-1: New function, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient ac02efc119 157/366: transient--scroll-commands: New variable, Jonas Bernoulli, 2022/01/25