From: Eshel Yaron Date: Wed, 23 Jul 2025 18:29:15 +0000 (+0200) Subject: Trim down default completion styles X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=781a0c35dd1d96abbdf5c29be7f7a840ba176fb2;p=emacs.git Trim down default completion styles --- diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 495039ac3fc..44a450e6bb6 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -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)))