[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/transient a35177475c 200/366: transient-suffixes: New f
From: |
Jonas Bernoulli |
Subject: |
[elpa] externals/transient a35177475c 200/366: transient-suffixes: New function |
Date: |
Tue, 25 Jan 2022 18:54:40 -0500 (EST) |
branch: externals/transient
commit a35177475c1feed2f4832ff5a3e092669ad26809
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
transient-suffixes: New function
Closes #98.
---
docs/transient.org | 11 +++++++++--
docs/transient.texi | 12 ++++++++++--
lisp/transient.el | 8 ++++++--
3 files changed, 25 insertions(+), 6 deletions(-)
diff --git a/docs/transient.org b/docs/transient.org
index 2e118d4359..0cc4c95e43 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-47-gd1caef51+1)
+#+SUBTITLE: for version 0.2.0 (v0.2.0-48-g8423bc69+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-47-gd1caef51+1).
+This manual is for Transient version 0.2.0 (v0.2.0-48-g8423bc69+1).
#+BEGIN_QUOTE
Copyright (C) 2018-2020 Jonas Bernoulli <jonas@bernoul.li>
@@ -1036,6 +1036,13 @@ function, which for infix arguments serves about the
same purpose as
command was not invoked from PREFIX, then it returns the set, saved
or default value for PREFIX.
+- Function: transient-suffixes prefix
+
+ This function returns the suffixes of the transient prefix command
+ PREFIX. This is a list of objects. This function should only be
+ used if you need the objects (as opposed to just their values) and
+ if the current command is not being invoked from PREFIX.
+
- Variable: transient-current-suffixes
The suffixes of the transient from which this suffix command was
diff --git a/docs/transient.texi b/docs/transient.texi
index ae8e5637ea..66a347da88 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-47-gd1caef51+1)
+@subtitle for version 0.2.0 (v0.2.0-48-g8423bc69+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-47-gd1caef51+1).
+This manual is for Transient version 0.2.0 (v0.2.0-48-g8423bc69+1).
@quotation
Copyright (C) 2018-2020 Jonas Bernoulli <jonas@@bernoul.li>
@@ -1286,6 +1286,14 @@ command was not invoked from PREFIX, then it returns the
set, saved
or default value for PREFIX@.
@end defun
+@defun transient-suffixes prefix
+
+This function returns the suffixes of the transient prefix command
+PREFIX@. This is a list of objects. This function should only be
+used if you need the objects (as opposed to just their values) and
+if the current command is not being invoked from PREFIX@.
+@end defun
+
@defvar transient-current-suffixes
The suffixes of the transient from which this suffix command was
diff --git a/lisp/transient.el b/lisp/transient.el
index 63dc78f538..ff3c3ec978 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -2598,13 +2598,17 @@ If the current command was invoked from the transient
prefix
command PREFIX, then return the active infix arguments. If
the current command was not invoked from PREFIX, then return
the set, saved or default value for PREFIX."
+ (delq nil (mapcar 'transient-infix-value (transient-suffixes prefix))))
+
+(defun transient-suffixes (prefix)
+ "Return the suffix objects of the transient prefix command PREFIX."
(if (eq transient-current-command prefix)
- (delq nil (mapcar 'transient-infix-value transient-current-suffixes))
+ transient-current-suffixes
(let ((transient--prefix nil)
(transient--layout nil)
(transient--suffixes nil))
(transient--init-objects prefix nil nil)
- (delq nil (mapcar 'transient-infix-value transient--suffixes)))))
+ transient--suffixes)))
(defun transient-get-value ()
(delq nil (mapcar (lambda (obj)
- [elpa] externals/transient 61af234d41 314/366: make: Update stats target, (continued)
- [elpa] externals/transient 61af234d41 314/366: make: Update stats target, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 09b436fad0 329/366: transient--debug: Ignore error in transient--suffix-symbol, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 4a36b1d922 336/366: Interpret t and nil for sub-prefixes in define-transient-prefix, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 714e348296 337/366: No longer always suspend when handle-switch-frame is called, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 6c9ae1f46a 346/366: manual: Replace some inaccurate information, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 12097b72d7 351/366: manual: Regenerate, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient b466cd9aab 360/366: transient-toggle-debug: New command, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 4c31a10113 350/366: Remove unnecessary with-eval-after-load, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 51585b8dd7 344/366: transient-reset: New command, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 45241225cf 355/366: transient-common-commands: Evaluate lambdas, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient a35177475c 200/366: transient-suffixes: New function,
Jonas Bernoulli <=
- [elpa] externals/transient d76f73f884 205/366: transient-arg-value: New function, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 0d79ccfaf8 218/366: transient--parse-suffix: Don't fallback to read-string for options, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 94582a3fd9 228/366: license: Update URLs and cleanup whitespace, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 6af9f8c3c0 254/366: Backport commit 12bab20920 from Emacs, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient b47e9d7d76 256/366: Release version 0.3.4, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient b711543401 261/366: Release version 0.3.5, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient 99e48369a5 269/366: transient--invalid: Add heisenbug catcher, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient e90481000f 271/366: Explicitly call transient--pre-command in button action, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient efdf91980a 273/366: transient--goto-button: Anchor headings, Jonas Bernoulli, 2022/01/25
- [elpa] externals/transient e17e2b2f6d 276/366: transient-show-help: Tweak self-suffixes, Jonas Bernoulli, 2022/01/25