emacs-diffs
[Top][All Lists]
Advanced

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

master 627e9c1 1/2: Revert two commits for bug#19032


From: João Távora
Subject: master 627e9c1 1/2: Revert two commits for bug#19032
Date: Tue, 8 Sep 2020 04:49:05 -0400 (EDT)

branch: master
commit 627e9c191ea57fa7ba69f30a98207c782b84bcdd
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>

    Revert two commits for bug#19032
    
    This reverts:
    
    - commit 585fe00557489e49188b6a301f001ef01ff15dcb, which is titled
      "Fix up previous icomplete-show-matches-on-no-input change"
    
    - commit 1b8d369c381b5a63e40529d0d95dfa75d94b8e09, which is titled
      "Change icomplete-show-matches-on-no-input behavior".
    
    A simpler, less intrusive fix follows shortly after this commit.
---
 lisp/icomplete.el  | 11 ++---------
 lisp/minibuffer.el | 10 ++--------
 2 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index 38115ab..eea5580 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -75,11 +75,7 @@ everything preceding the ~/ is discarded so the interactive
 selection process starts again from the user's $HOME.")
 
 (defcustom icomplete-show-matches-on-no-input nil
-  "When non-nil, show completions when first prompting for input.
-This also means that if you traverse the list of completions with
-commands like `C-.' and just hit `C-j' (enter) without typing any
-characters, the match under point will be chosen instead of the
-default."
+  "When non-nil, show completions when first prompting for input."
   :type 'boolean
   :version "24.4")
 
@@ -755,10 +751,7 @@ matches exist."
                (push comp prospects)
              (setq limit t))))
        (setq prospects (nreverse prospects))
-        ;; Return the first match if the user hits enter.
-        (when icomplete-show-matches-on-no-input
-          (setq-local completion-content-when-empty (car prospects)))
-        ;; Decorate first of the prospects.
+       ;; Decorate first of the prospects.
        (when prospects
          (let ((first (copy-sequence (pop prospects))))
            (put-text-property 0 (length first)
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 864726e..6deb1eb 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -1119,7 +1119,6 @@ completion candidates than this number."
 (defvar-local completion-all-sorted-completions nil)
 (defvar-local completion--all-sorted-completions-location nil)
 (defvar completion-cycling nil)      ;Function that takes down the cycling map.
-(defvar completion-content-when-empty nil)
 
 (defvar completion-fail-discreetly nil
   "If non-nil, stay quiet when there  is no match.")
@@ -1504,13 +1503,8 @@ If `minibuffer-completion-confirm' is 
`confirm-after-completion',
 COMPLETION-FUNCTION is called if the current buffer's content does not
 appear to be a match."
     (cond
-     ;; Allow user to specify null string.  In the case that
-     ;; `completion-content-when-empty' is set, use that instead.
-     ((= beg end)
-      (when completion-content-when-empty
-        (completion--replace beg end completion-content-when-empty))
-      (funcall exit-function))
-
+     ;; Allow user to specify null string
+   ((= beg end) (funcall exit-function))
      ((test-completion (buffer-substring beg end)
                        minibuffer-completion-table
                        minibuffer-completion-predicate)



reply via email to

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