summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2023-11-27 16:12:07 +0100
committerJonas Bernoulli <jonas@bernoul.li>2023-11-27 16:12:07 +0100
commit600b2df42535ca7077252f37dedd111349b76116 (patch)
tree96a4b3321140d0c9aeeea8275716328fd904079b
parenta54f63f23017302b9db746d21c56d229974bee25 (diff)
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
-rw-r--r--lisp/transient.el28
1 files changed, 11 insertions, 17 deletions
diff --git a/lisp/transient.el b/lisp/transient.el
index f76fa1b..3c8353f 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))