bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#61535: 29.0.60; choose-completion erases in-region buffer


From: Juri Linkov
Subject: bug#61535: 29.0.60; choose-completion erases in-region buffer
Date: Wed, 15 Feb 2023 20:32:18 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

0. emacs-29 -Q
1. type: (with-c C-M-i
2. type: M-down ... M-RET
3. check that the whole buffer was deleted before a selected
   completion candidate was inserted to the buffer:
   C-h v buffer-undo-list RET

Here is a possible fix for emacs-29:

diff --git a/lisp/simple.el b/lisp/simple.el
index c58acfe3adc..1924567cc3f 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -9882,7 +9882,8 @@ choose-completion
       (with-current-buffer buffer
         (choose-completion-string
          choice buffer
-         (or (and completion-use-base-affixes base-affixes)
+         (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]