]> git.eshelyaron.com Git - emacs.git/commitdiff
Trim down default completion styles
authorEshel Yaron <me@eshelyaron.com>
Wed, 23 Jul 2025 18:29:15 +0000 (20:29 +0200)
committerEshel Yaron <me@eshelyaron.com>
Wed, 23 Jul 2025 18:29:15 +0000 (20:29 +0200)
lisp/minibuffer.el

index 495039ac3fcb6d6a08713a6d2bbb46efff83286a..44a450e6bb60c984c6468b63da8d6c9b0ae39dfe 100644 (file)
@@ -1167,19 +1167,7 @@ and DOC describes the way this style of completion works.")
   `(repeat :tag "insert a new menu to add more styles"
            (choice :convert-widget completion--update-styles-options)))
 
-(defcustom completion-styles
-  ;; First, use `basic' because prefix completion has been the standard
-  ;; for "ever" and works well in most cases, so using it first
-  ;; ensures that we obey previous behavior in most cases.
-  '(basic
-    ;; Then use `partial-completion' because it has proven to
-    ;; be a very convenient extension.
-    partial-completion
-    ;; Finally use `emacs22' so as to maintain (in many/most cases)
-    ;; the previous behavior that when completing "foobar" with point
-    ;; between "foo" and "bar" the completion try to complete "foo"
-    ;; and simply add "bar" to the end of the result.
-    emacs22)
+(defcustom completion-styles '(partial-completion)
   "List of completion styles to use.
 The available styles are listed in `completion-styles-alist'.
 
@@ -1189,25 +1177,25 @@ styles for specific categories, such as files, buffers, etc."
   :version "23.1")
 
 (defvar completion-category-defaults
-  '((buffer (styles basic substring)
+  '((buffer (styles substring)
             (export-function . minibuffer-export-list-buffers))
     (file (export-function . minibuffer-export-dired))
-    (unicode-name (styles basic substring))
+    (unicode-name (styles substring))
     ;; A new style that combines substring and pcm might be better,
     ;; e.g. one that does not anchor to bos.
     (project-file (styles substring))
     (dabbrev (styles basic))
     (search (styles regexp))
     (xref-location (styles substring))
-    (info-menu (styles basic substring))
-    (symbol-help (styles basic partial-completion shorthand substring))
-    (multiple-choice (styles basic substring) (sort-function . identity))
+    (info-menu (styles substring))
+    (symbol-help (styles partial-completion))
+    (multiple-choice (styles substring) (sort-function . identity))
     (calendar-month (sort-function . identity))
     (predicate-description (sort-function . identity))
     (search (sort-function . identity))
     (keybinding (sort-function . minibuffer-sort-alphabetically)
                 (eager-display . t))
-    (function (styles partial-completion substring)
+    (function (styles partial-completion)
               (sort-function . minibuffer-sort-alphabetically)
               (affixation-function . minibuffer-function-affixation))
     (library (sort-function . minibuffer-sort-alphabetically)))