emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/transient 6103f168aa 28/38: transient--describe-functio


From: Jonas Bernoulli
Subject: [elpa] externals/transient 6103f168aa 28/38: transient--describe-function: Deal with anonymous infix arguments
Date: Tue, 11 Jan 2022 05:37:46 -0500 (EST)

branch: externals/transient
commit 6103f168aa0ef0b06bfa862ca0c2589b7be9600b
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>

    transient--describe-function: Deal with anonymous infix arguments
    
    Add a special-case for when no man-page is set.
---
 lisp/transient.el | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/lisp/transient.el b/lisp/transient.el
index 32e4f38b76..839f820b57 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -3535,9 +3535,24 @@ manpage, then try to jump to the correct location."
   (transient--describe-function cmd))
 
 (defun transient--describe-function (fn)
-  (describe-function fn)
+  (describe-function (if (symbolp fn) fn 'transient--anonymous-infix-argument))
   (select-window (get-buffer-window (help-buffer))))
 
+(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))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]