branch: externals/transient
commit 0d56235033e87370b0ef4d3bff09edf076edab1a
Author: Jonas Bernoulli <[email protected]>
Commit: Jonas Bernoulli <[email protected]>

    transient-enable-menu-navigation: Improve documentation
---
 docs/transient.org  | 21 ++++++++++++---------
 docs/transient.texi | 22 +++++++++++++---------
 lisp/transient.el   | 18 ++++++++----------
 3 files changed, 33 insertions(+), 28 deletions(-)

diff --git a/docs/transient.org b/docs/transient.org
index a0ef876011..e9cfb5ba9e 100644
--- a/docs/transient.org
+++ b/docs/transient.org
@@ -604,21 +604,24 @@ Two more essential options are documented in [[* Common 
Suffix Commands]].
   brief documentation about the command under point is additionally
   show in the echo area.
 
-  While a transient is active the menu buffer is not the current
-  buffer, making it necessary to use dedicated commands to act on that
-  buffer itself.  If this option is non-~nil~, then the following
-  features are available:
+  While a transient is active, the menu buffer is (by default) not the
+  current buffer, making it necessary to use dedicated commands to act
+  on that buffer itself.  If this option is non-nil, then the following
+  bindings are available:
 
   - {{{kbd(UP)}}} moves the cursor to the previous suffix.
   - {{{kbd(DOWN)}}} moves the cursor to the next suffix.
   - {{{kbd(M-RET)}}} invokes the suffix the cursor is on.
-  - {{{kbd(mouse-1)}}} invokes the clicked on suffix.
+  - {{{kbd(mouse-1)}}} and {{{kbd(mouse-2)}}} invokes the clicked on suffix.
   - {{{kbd(C-s)}}} and {{{kbd(C-r)}}} start isearch in the menu buffer.
 
-  By default {{{kbd(M-RET)}}} is bound to ~transient-push-button~, instead of
-  {{{kbd(RET)}}}, because if a transient allows the invocation of non-suffixes,
-  then it is likely, that you would want {{{kbd(RET)}}} to do what it would do
-  if no transient were active."
+  {{{kbd(mouse-1)}}} and {{{kbd(mouse-2)}}} are bound in 
~transient-button-map~.
+  All other bindings are in ~transient-popup-navigation-map~.
+
+  Instead of {{{kbd(RET)}}}, {{{kbd(M-RET)}}} is used to invoke the suffix 
command at point by
+  default, because if a transient allows the invocation of non-suffixes,
+  then it is likely that the user would want the former do what it would
+  do if no transient were active.
 
 - User Option: transient-display-buffer-action ::
 
diff --git a/docs/transient.texi b/docs/transient.texi
index c430638a2e..a8c0aa702c 100644
--- a/docs/transient.texi
+++ b/docs/transient.texi
@@ -753,10 +753,10 @@ transient's menu buffer.  If the value is @code{verbose} 
(the default),
 brief documentation about the command under point is additionally
 show in the echo area.
 
-While a transient is active the menu buffer is not the current
-buffer, making it necessary to use dedicated commands to act on that
-buffer itself.  If this option is non-@code{nil}, then the following
-features are available:
+While a transient is active, the menu buffer is (by default) not the
+current buffer, making it necessary to use dedicated commands to act
+on that buffer itself.  If this option is non-nil, then the following
+bindings are available:
 
 @itemize
 @item
@@ -766,15 +766,18 @@ features are available:
 @item
 @kbd{M-@key{RET}} invokes the suffix the cursor is on.
 @item
-@kbd{mouse-1} invokes the clicked on suffix.
+@kbd{mouse-1} and @kbd{mouse-2} invokes the clicked on suffix.
 @item
 @kbd{C-s} and @kbd{C-r} start isearch in the menu buffer.
 @end itemize
 
-By default @kbd{M-@key{RET}} is bound to @code{transient-push-button}, instead 
of
-@kbd{@key{RET}}, because if a transient allows the invocation of non-suffixes,
-then it is likely, that you would want @kbd{@key{RET}} to do what it would do
-if no transient were active."
+@kbd{mouse-1} and @kbd{mouse-2} are bound in @code{transient-button-map}.
+All other bindings are in @code{transient-popup-navigation-map}.
+
+Instead of @kbd{@key{RET}}, @kbd{M-@key{RET}} is used to invoke the suffix 
command at point by
+default, because if a transient allows the invocation of non-suffixes,
+then it is likely that the user would want the former do what it would
+do if no transient were active.
 @end defopt
 
 @defopt transient-display-buffer-action
@@ -838,6 +841,7 @@ don't hesitate to contact me.
 (setopt transient-force-single-column t)
 (setopt transient-navigate-to-group-descriptions t)
 (setopt transient-describe-menu t)
+(add-hook 'transient-setup-buffer-hook 'ding)
 @end lisp
 
 Additionally you have allow the command, which you use to read the
diff --git a/lisp/transient.el b/lisp/transient.el
index 352d23c89f..19b16226d5 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -171,28 +171,26 @@ from Emacs commit 
e680827e814e155cf79175d87ff7c6ee3a08b69a."
 If the value is `verbose' (the default), additionally show brief
 documentation about the command under point in the echo area.
 
-While a transient is active transient's menu buffer is not the
-current buffer, making it necessary to use dedicated commands to
-act on that buffer itself.  If this is non-nil, then the following
+While a transient is active, the menu buffer is (by default) not the
+current buffer, making it necessary to use dedicated commands to act
+on that buffer itself.  If this option is non-nil, then the following
 bindings are available:
 
 \\<transient-popup-navigation-map>\
 - \\[transient-backward-button] moves the cursor to the previous suffix.
 - \\[transient-forward-button] moves the cursor to the next suffix.
 - \\[transient-push-button] invokes the suffix the cursor is on.
-\\<transient-button-map>\
 - \\`<mouse-1>' and \\`<mouse-2>' invoke the clicked on suffix.
-\\<transient-popup-navigation-map>\
 - \\[transient-isearch-backward]\
  and \\[transient-isearch-forward] start isearch in the menu buffer.
 
-\\`<mouse-1>' and \\`<mouse-2>' are bound in `transient-push-button'.
+\\`<mouse-1>' and \\`<mouse-2>' are bound in `transient-button-map'.
 All other bindings are in `transient-popup-navigation-map'.
 
-By default \\`M-RET' is bound to `transient-push-button', instead of
-\\`RET', because if a transient allows the invocation of non-suffixes,
-then it is likely, that you would want \\`RET' to do what it would do
-if no transient were active."
+Instead of \\`RET', \\`M-RET' is used to invoke the suffix command at point by
+default, because if a transient allows the invocation of non-suffixes,
+then it is likely that the user would want the former do what it would
+do if no transient were active."
   :package-version '(transient . "0.7.8")
   :group 'transient
   :type '(choice (const :tag "Enable navigation and echo summary" verbose)

Reply via email to