[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/transient 1b9929eca9 197/366: Add new `unsavable' infix
From: |
Jonas Bernoulli |
Subject: |
[elpa] externals/transient 1b9929eca9 197/366: Add new `unsavable' infix slot |
Date: |
Tue, 25 Jan 2022 18:54:40 -0500 (EST) |
branch: externals/transient
commit 1b9929eca9b1076fb04794b6736d42a1d394fadb
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
Add new `unsavable' infix slot
If this is non-nil, then the value of the infix is removed from
the prefix value before saving, setting and adding to history.
Re #96.
---
docs/transient.org | 7 +++++--
docs/transient.texi | 9 +++++++--
lisp/transient.el | 7 ++++++-
3 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/docs/transient.org b/docs/transient.org
index 01486a150b..d7736b5bd0 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.2.0 (v0.2.0-44-gf0f3e2b9+1)
+#+SUBTITLE: for version 0.2.0 (v0.2.0-45-g313eee0f+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.2.0 (v0.2.0-44-gf0f3e2b9+1).
+This manual is for Transient version 0.2.0 (v0.2.0-45-g313eee0f+1).
#+BEGIN_QUOTE
Copyright (C) 2018-2020 Jonas Bernoulli <jonas@bernoul.li>
@@ -1593,6 +1593,9 @@ They are defined here anyway to allow sharing certain
methods.
- ~value~ The value. Should not be accessed directly.
+- ~unsavable~ Whether the value of the suffix is not saved as part of
+ the prefixes.
+
- ~multi-value~ For options, whether the option can have multiple
values. If non-nil, then default to use ~completing-read-multiple~.
diff --git a/docs/transient.texi b/docs/transient.texi
index a45d2b5da0..b692001b69 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.2.0 (v0.2.0-44-gf0f3e2b9+1)
+@subtitle for version 0.2.0 (v0.2.0-45-g313eee0f+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.2.0 (v0.2.0-44-gf0f3e2b9+1).
+This manual is for Transient version 0.2.0 (v0.2.0-45-g313eee0f+1).
@quotation
Copyright (C) 2018-2020 Jonas Bernoulli <jonas@@bernoul.li>
@@ -1973,6 +1973,11 @@ They are defined here anyway to allow sharing certain
methods.
@code{value} The value. Should not be accessed directly.
+@item
+@code{unsavable} Whether the value of the suffix is not saved as part of
+the prefixes.
+
+
@item
@code{multi-value} For options, whether the option can have multiple
values. If non-nil, then default to use @code{completing-read-multiple}.
diff --git a/lisp/transient.el b/lisp/transient.el
index f676e17ac2..a5959286b3 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -650,6 +650,7 @@ slot is non-nil."
(argument :initarg :argument)
(shortarg :initarg :shortarg)
(value :initform nil)
+ (unsavable :initarg :unsavable :initform nil)
(multi-value :initarg :multi-value :initform nil)
(always-read :initarg :always-read :initform nil)
(allow-empty :initarg :allow-empty :initform nil)
@@ -2598,7 +2599,11 @@ the set, saved or default value for PREFIX."
(delq nil (mapcar 'transient-infix-value transient--suffixes)))))
(defun transient-get-value ()
- (delq nil (mapcar 'transient-infix-value transient-current-suffixes)))
+ (delq nil (mapcar (lambda (obj)
+ (and (or (not (slot-exists-p obj 'unsavable))
+ (not (oref obj unsavable)))
+ (transient-infix-value obj)))
+ transient-current-suffixes)))
(cl-defgeneric transient-infix-value (obj)
"Return the value of the suffix object OBJ.
- [elpa] externals/transient de5a325616 349/366: Re-align debug declarations, (continued)
- [elpa] externals/transient de5a325616 349/366: Re-align debug declarations, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 6103f168aa 347/366: transient--describe-function: Deal with anonymous infix arguments, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 4477555b17 366/366: transient--post-exit: Deal with unbound transient slot properly, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient ad7f255308 116/366: For popups set tab-line-format to nil, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 0ad64ddc5d 010/366: transient-remove-suffix: Fix removal of last child of a group, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient f2ef69cfcc 176/366: transient--get-predicate-for: New function, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient f2252d53b6 188/366: Support delaying setup of suffixes until prefix invocation, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient a3e536333e 189/366: Support anonymous non-infix suffixes, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient aaac13bb9d 193/366: transient--make-transient-map: Don't explicitly take emergency exit, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 313eee0f1c 196/366: manual: Document more infix slots, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 1b9929eca9 197/366: Add new `unsavable' infix slot,
Jonas Bernoulli <=
- [elpa] externals/transient 8b22b52b83 211/366: Support defining a per-prefix fallback suffix description function, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 7065e1ce86 229/366: manual: Various small improvements, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 030d0fe56b 251/366: Rearrange library header, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 779b847c20 252/366: make: Update path to ox-extra, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient eb28c513a8 253/366: Release version 0.3.3, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 6e741ee2bd 260/366: Stop using oref-default to get default value of object-allocated slot, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 90a0562200 265/366: transient-highlight-higher-levels: New option, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 769219b5f5 272/366: Enable section movement, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 626d105ecf 274/366: transient--read-number-N: Return empty string instead of nil, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 57942fe961 280/366: manual: No longer depend on the ox-extra package, Jonas Bernoulli, 2022/01/25