[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/transient 600b2df425 5/5: transient--default-infix-comm
|
From: |
Jonas Bernoulli |
|
Subject: |
[elpa] externals/transient 600b2df425 5/5: transient--default-infix-command: Add fallback docstring |
|
Date: |
Mon, 27 Nov 2023 10:14:30 -0500 (EST) |
branch: externals/transient
commit 600b2df42535ca7077252f37dedd111349b76116
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
transient--default-infix-command: Add fallback docstring
Remove `transient--anonymous-infix-argument', which was originally
used for the same purpose, but was dead code since [1: 226db67b].
1: 2023-08-12 226db67b3680acbeb74cb0403e1a302917054174
All suffix commands now must be accessed through fbound symbols
---
lisp/transient.el | 28 +++++++++++-----------------
1 file changed, 11 insertions(+), 17 deletions(-)
diff --git a/lisp/transient.el b/lisp/transient.el
index f76fa1b560..3c8353f262 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -998,7 +998,16 @@ example, sets a variable, use `transient-define-infix'
instead.
\(fn NAME ARGLIST [DOCSTRING] [KEYWORD VALUE]...)")
(defun transient--default-infix-command ()
- "Most transient infix commands are but an alias for this command."
+ ;; Most infix commands are but an alias for this command.
+ "Cannot show any documentation for this anonymous infix command.
+
+This infix command was defined anonymously, i.e., it was define
+inside a call to `transient-define-prefix'.
+
+When you request help for such an infix command, then we usually
+show the respective man-page and jump to the location where the
+respective argument is being described. This isn't possible in
+this case, because the `man-page' slot was not set in this case."
(interactive)
(let ((obj (transient-suffix-object)))
(transient-infix-set obj (transient-infix-read obj)))
@@ -3983,7 +3992,7 @@ manpage, then try to jump to the correct location."
(transient--describe-function cmd))
(defun transient--describe-function (fn)
- (describe-function (if (symbolp fn) fn 'transient--anonymous-infix-argument))
+ (describe-function fn)
(unless (derived-mode-p 'help-mode)
(when-let* ((buf (get-buffer "*Help*"))
(win (or (and buf (get-buffer-window buf))
@@ -3993,21 +4002,6 @@ manpage, then try to jump to the correct location."
(window-list)))))
(select-window win))))
-(defun transient--anonymous-infix-argument ()
- "Cannot show any documentation for this anonymous infix command.
-
-The infix command in question was defined anonymously, i.e.,
-it was define when the prefix command that it belongs to was
-defined, which means that it gets no docstring and also that
-no symbol is bound to it.
-
-When you request help for an infix command, then we usually
-show the respective man-page and jump to the location where
-the respective argument is being described.
-
-Because the containing prefix command does not specify any
-man-page, we cannot do that in this case. Sorry about that.")
-
(defun transient--show-manual (manual)
(info manual))
- [elpa] externals/transient updated (af6eb31054 -> 600b2df425), Jonas Bernoulli, 2023/11/27
- [elpa] externals/transient 2b892a27a1 3/5: transient-format-key(around:suffix): Add docstring, Jonas Bernoulli, 2023/11/27
- [elpa] externals/transient 600b2df425 5/5: transient--default-infix-command: Add fallback docstring,
Jonas Bernoulli <=
- [elpa] externals/transient 5aa4b1ba38 1/5: transient-format(around:suffix): Fix detection of minibuffer usage, Jonas Bernoulli, 2023/11/27
- [elpa] externals/transient 79f5ec70f3 2/5: Use static-if to pick an implementation of transient--wrap-command, Jonas Bernoulli, 2023/11/27
- [elpa] externals/transient a54f63f230 4/5: transient-key-{stay, noop, return, exit}: Complete docstrings, Jonas Bernoulli, 2023/11/27