[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/transient dcf7a4dc62 084/366: transient-read-with-initi
From: |
Jonas Bernoulli |
Subject: |
[elpa] externals/transient dcf7a4dc62 084/366: transient-read-with-initial-input: New option |
Date: |
Tue, 25 Jan 2022 18:54:29 -0500 (EST) |
branch: externals/transient
commit dcf7a4dc629b5a3b99804a7eb7bf11dac720fa32
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
transient-read-with-initial-input: New option
Closes #46.
---
docs/transient.org | 11 +++++++++--
docs/transient.texi | 12 ++++++++++--
lisp/transient.el | 9 ++++++++-
3 files changed, 27 insertions(+), 5 deletions(-)
diff --git a/docs/transient.org b/docs/transient.org
index 6c475cce77..9ba6c2eb8e 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-75-ge7a16d2+1)
+#+SUBTITLE: for version 0.1.0 (v0.1.0-82-gf0a7a97+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-75-ge7a16d2+1).
+This manual is for Transient version 0.1.0 (v0.1.0-82-gf0a7a97+1).
#+BEGIN_QUOTE
Copyright (C) 2018-2019 Jonas Bernoulli <jonas@bernoul.li>
@@ -553,6 +553,13 @@ window, and the key bindings are the same as for
~scroll-up-command~ and
Otherwise this can be any mode-line format. See ~[[info:elisp#Mode
Line Format]] for details.
+- User Option: transient-read-with~initial-input
+
+ This option controls whether the last history element is used as the
+ initial minibuffer input when reading the value of an infix argument
+ from the user. If ~nil~, then there is no initial input and the first
+ element has to be accessed the same way as the older elements.
+
- User Option: transient-highlight-mismatched-keys
This option controls whether key bindings of infix commands that do
diff --git a/docs/transient.texi b/docs/transient.texi
index c715e02051..eb1a75ce4c 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-75-ge7a16d2+1)
+@subtitle for version 0.1.0 (v0.1.0-82-gf0a7a97+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-75-ge7a16d2+1).
+This manual is for Transient version 0.1.0 (v0.1.0-82-gf0a7a97+1).
@quotation
Copyright (C) 2018-2019 Jonas Bernoulli <jonas@@bernoul.li>
@@ -740,6 +740,14 @@ thin line is drawn instead, using the background color of
the face
Otherwise this can be any mode-line format. See ~@ref{Mode Line
Format,,,elisp,} for details.
@end defopt
+@defopt transient-read-with~initial-input
+
+This option controls whether the last history element is used as the
+initial minibuffer input when reading the value of an infix argument
+from the user. If @code{nil}, then there is no initial input and the first
+element has to be accessed the same way as the older elements.
+@end defopt
+
@defopt transient-highlight-mismatched-keys
This option controls whether key bindings of infix commands that do
diff --git a/lisp/transient.el b/lisp/transient.el
index 74a7826b90..7937cc065e 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -173,6 +173,12 @@ of this variable use \"C-x t\" when a transient is active."
:group 'transient
:type 'boolean)
+(defcustom transient-read-with-initial-input t
+ "Whether to use the last history element as initial minibuffer input."
+ :package-version '(transient . "0.2.0")
+ :group 'transient
+ :type 'boolean)
+
(defcustom transient-highlight-mismatched-keys nil
"Whether to highlight keys that do not match their argument.
@@ -2145,7 +2151,8 @@ it\", in which case it is pointless to preserve history.)"
(eq value (car transient--history)))
transient--history
(cons value transient--history)))
- (initial-input (car transient--history))
+ (initial-input (and transient-read-with-initial-input
+ (car transient--history)))
(history (cons 'transient--history (if initial-input 1 0)))
(value
(cond
- [elpa] externals/transient 6d721f7490 348/366: Don't use convert-standard-filename when defining path variables, (continued)
- [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, 2022/01/25
- [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 <=
- [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
- [elpa] externals/transient 9683e8add2 165/366: transient--do-suffix-p: New function, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient ec2de622d2 171/366: transient-suffix-object: Check type of argument, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient bcd07e065b 172/366: transient--suffix-symbol: Split from transient--suffix-command, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 293a437d66 206/366: Support padding of keys regardless of the group's class, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 3284f6a0fe 213/366: transient-init-value: Support per-object functions for prefixes, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 809fd048b1 223/366: transient--insert-suffix: Add comments, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient fd2695d12c 217/366: transient--with-emergency-exit: Wrap default debug function, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient f086cb620b 224/366: transient--insert-suffix: Allow same key with different predicates, Jonas Bernoulli, 2022/01/25