GNU bug report logs -
#68689
30.0.50; minibuffer-visible-completions should change completion-show-help
Previous Next
Reported by: Spencer Baugh <sbaugh <at> janestreet.com>
Date: Wed, 24 Jan 2024 16:10:01 UTC
Severity: normal
Fixed in version 30.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Patch to fix
[0001-Update-minibuffer-show-help-based-on-minibuffer-visi.patch (text/x-patch, inline)]
From c70736c52262cacb905ed1e564b2335a3c87f5b4 Mon Sep 17 00:00:00 2001
From: Spencer Baugh <sbaugh <at> janestreet.com>
Date: Wed, 24 Jan 2024 11:10:40 -0500
Subject: [PATCH] Update minibuffer-show-help based on
minibuffer-visible-completions
minibuffer-visible-completions makes some more convenient bindings
available, but the help shown by minibuffer-show-help wasn't
suggesting them. Now it is.
* lisp/simple.el (completion-setup-function): Change help text when
minibuffer-visible-completions is non-nil. (bug#68689)
---
lisp/simple.el | 28 +++++++++++++++++++++-------
1 file changed, 21 insertions(+), 7 deletions(-)
diff --git a/lisp/simple.el b/lisp/simple.el
index 35fd76b8d1a..23019dd1138 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -10232,13 +10232,27 @@ completion-setup-function
;; Maybe insert help string.
(when completion-show-help
(goto-char (point-min))
- (insert (substitute-command-keys
- (if (display-mouse-p)
- "Click or type \\[minibuffer-choose-completion] on a completion to select it.\n"
- "Type \\[minibuffer-choose-completion] on a completion to select it.\n")))
- (insert (substitute-command-keys
- "Type \\[minibuffer-next-completion] or \\[minibuffer-previous-completion] \
-to move point between completions.\n\n"))))))
+ (if minibuffer-visible-completions
+ (let ((helps
+ (with-current-buffer (window-buffer (active-minibuffer-window))
+ (list
+ (substitute-command-keys
+ (if (display-mouse-p)
+ "Click or type \\[minibuffer-choose-completion-or-exit] on a completion to select it.\n"
+ "Type \\[minibuffer-choose-completion-or-exit] on a completion to select it.\n"))
+ (substitute-command-keys
+ "Type \\[minibuffer-next-completion], \\[minibuffer-previous-completion], \
+\\[minibuffer-next-line-completion], \\[minibuffer-previous-line-completion] \
+to move point between completions.\n\n")))))
+ (dolist (help helps)
+ (insert help)))
+ (insert (substitute-command-keys
+ (if (display-mouse-p)
+ "Click or type \\[minibuffer-choose-completion] on a completion to select it.\n"
+ "Type \\[minibuffer-choose-completion] on a completion to select it.\n")))
+ (insert (substitute-command-keys
+ "Type \\[minibuffer-next-completion] or \\[minibuffer-previous-completion] \
+to move point between completions.\n\n")))))))
(add-hook 'completion-setup-hook #'completion-setup-function)
--
2.39.3
This bug report was last modified 1 year and 119 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.