Variable: completion-category-overrides
completion-category-overrides is a customizable variable defined in
minibuffer.el.gz.
Value
nil
Documentation
List of category-specific user overrides for completion metadata.
Each override has the shape (CATEGORY . ALIST) where ALIST is
an association list that can specify properties such as:
- styles: the list of completion-styles to use for that category.
- cycle: the completion-cycle-threshold to use for that category.
- cycle-sort-function: function to sort entries when cycling.
- display-sort-function: nil means to use either the sorting
function from metadata, or if that is nil, fall back to completions-sort;
identity disables sorting and keeps the original order; and other
possible values are the same as in completions-sort.
- group-function: function for grouping the completion candidates.
- annotation-function: function to add annotations in *Completions*.
- affixation-function: function to prepend/append a prefix/suffix.
See more description of metadata in completion-metadata.
Categories are symbols such as buffer and file, used when
completing buffer and file names, respectively.
If a property in a category is specified by this variable, it
overrides the default specified in completion-category-defaults.
This variable was added, or its default value changed, in Emacs 25.1.
Probably introduced at or before Emacs version 24.1.
Source Code
;; Defined in /usr/src/emacs/lisp/minibuffer.el.gz
(defcustom completion-category-overrides nil
"List of category-specific user overrides for completion metadata.
Each override has the shape (CATEGORY . ALIST) where ALIST is
an association list that can specify properties such as:
- `styles': the list of `completion-styles' to use for that category.
- `cycle': the `completion-cycle-threshold' to use for that category.
- `cycle-sort-function': function to sort entries when cycling.
- `display-sort-function': nil means to use either the sorting
function from metadata, or if that is nil, fall back to `completions-sort';
`identity' disables sorting and keeps the original order; and other
possible values are the same as in `completions-sort'.
- `group-function': function for grouping the completion candidates.
- `annotation-function': function to add annotations in *Completions*.
- `affixation-function': function to prepend/append a prefix/suffix.
See more description of metadata in `completion-metadata'.
Categories are symbols such as `buffer' and `file', used when
completing buffer and file names, respectively.
If a property in a category is specified by this variable, it
overrides the default specified in `completion-category-defaults'."
:version "25.1"
:type `(alist :key-type (choice :tag "Category"
(const buffer)
(const file)
(const unicode-name)
(const bookmark)
symbol)
:value-type
(set :tag "Properties to override"
(cons :tag "Completion Styles"
(const :tag "Select a style from the menu;" styles)
,completion--styles-type)
(cons :tag "Completion Cycling"
(const :tag "Select one value from the menu." cycle)
,completion--cycling-threshold-type)
(cons :tag "Cycle Sorting"
(const :tag "Select one value from the menu."
cycle-sort-function)
(choice (function :tag "Custom function")))
(cons :tag "Completion Sorting"
(const :tag "Select one value from the menu."
display-sort-function)
(choice (const :tag "Use default" nil)
(const :tag "No sorting" identity)
(const :tag "Alphabetical sorting"
minibuffer-sort-alphabetically)
(const :tag "Historical sorting"
minibuffer-sort-by-history)
(function :tag "Custom function")))
(cons :tag "Completion Groups"
(const :tag "Select one value from the menu."
group-function)
(choice (function :tag "Custom function")))
(cons :tag "Completion Annotation"
(const :tag "Select one value from the menu."
annotation-function)
(choice (function :tag "Custom function")))
(cons :tag "Completion Affixation"
(const :tag "Select one value from the menu."
affixation-function)
(choice (function :tag "Custom function"))))))