emacs-diffs
[Top][All Lists]
Advanced

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

emacs-29 683961cd733: * lisp/simple.el (choose-completion): Check for co


From: Juri Linkov
Subject: emacs-29 683961cd733: * lisp/simple.el (choose-completion): Check for completion-in-region-mode.
Date: Sun, 19 Feb 2023 14:31:51 -0500 (EST)

branch: emacs-29
commit 683961cd733d4a660ffdb9c1a6e6ad565ffae2cb
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>

    * lisp/simple.el (choose-completion): Check for completion-in-region-mode.
    
    Don't use base-affixes when completion-use-base-affixes is non-nil
    in completion-in-region-mode (bug#61535).
---
 lisp/simple.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lisp/simple.el b/lisp/simple.el
index 27aeb2fa8cc..5f23910efc6 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -9884,7 +9884,12 @@ minibuffer, but don't quit the completions window."
       (with-current-buffer buffer
         (choose-completion-string
          choice buffer
-         (or (and completion-use-base-affixes base-affixes)
+         ;; Don't allow affixes to replace the whole buffer when not
+         ;; in the minibuffer.  Thus check for `completion-in-region-mode'
+         ;; to ignore non-nil value of `completion-use-base-affixes' set by
+         ;; `minibuffer-choose-completion'.
+         (or (and (not completion-in-region-mode)
+                  completion-use-base-affixes base-affixes)
              base-position
              ;; If all else fails, just guess.
              (list (choose-completion-guess-base-position choice)))



reply via email to

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