Subject: bug#78118: [PATCH] ; Isearch: Fix key bindings in documentation string

From: Jake Forster <[email-masked]>
Date: Mon, 28 Apr 2025 14:31:57 +0000

I found another occurrence of this docstring bug in
`isearch-motion-changes-direction'.  I also had to fix the displayed
filling in my patch.
Please disregard the previous patch and see the attached v2 one instead.
Sorry for the noise.

Jake
From 4c9dfb9d3e96dffe5c60c3b859f5effd0d28e913 Mon Sep 17 00:00:00 2001
From: Jake Forster <[email-masked]>
Date: Mon, 28 Apr 2025 22:22:18 +0930
Subject: [PATCH] ; Isearch: Fix key bindings in documentaion string

* lisp/isearch.el (isearch-allow-motion)
(isearch-motion-changes-direction): Use isearch-mode-map for commands in
documentation string.
---
 lisp/isearch.el | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/lisp/isearch.el b/lisp/isearch.el
index e37d1814eb7..511ecc5efae 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -3051,11 +3051,11 @@ See also the related option `isearch-allow-motion'."
 
 (defcustom isearch-allow-motion nil
   "Whether to allow movement between isearch matches by cursor motion commands.
-If non-nil, the four motion commands \\[beginning-of-buffer], \\[end-of-buffer], \
-\\[scroll-up-command] and \\[scroll-down-command], when invoked during
-Isearch, move respectively to the first occurrence of the current search string
-in the buffer, the last one, the first one after the current window, and the
-last one before the current window.
+If non-nil, the four motion commands \\<isearch-mode-map>\\[beginning-of-buffer], \\[end-of-buffer], \
+\\[scroll-up-command] and \\[scroll-down-command], when invoked
+during Isearch, move respectively to the first occurrence of the current
+search string in the buffer, the last one, the first one after the current
+window, and the last one before the current window.
 If nil, these motion commands normally exit Isearch and are executed.
 See also the related options `isearch-motion-changes-direction' and
 `isearch-allow-scroll'."
@@ -3068,8 +3068,8 @@ See also the related options `isearch-motion-changes-direction' and
   "Whether motion commands during incremental search change search direction.
 If nil, the search direction (forward or backward) does not change when
 motion commands are used during incremental search, except when wrapping.
-If non-nil, the search direction is forward after \\[beginning-of-buffer] and \
-\\[scroll-up-command], and
+If non-nil, the search direction is forward after \
+\\<isearch-mode-map>\\[beginning-of-buffer] and \\[scroll-up-command], and
 backward after \\[end-of-buffer] and \\[scroll-down-command]."
   :type '(choice (const :tag "Off" nil)
                  (const :tag "On" t))
-- 
2.49.0