Function: completion-category-get

completion-category-get is a byte-compiled function defined in minibuffer.el.gz.

Signature

(completion-category-get CAT PROP)

Documentation

Get property PROP of completion category CAT.

This function consults completion-category-overrides and completion-category-defaults to determine the value for PROP in CAT. If no value is found in these variables, then this function goes over the parent categories of CAT (specified in the definition of CAT with define-completion-category, which see), and chooses the first value any of them specify (directly or via inheritance), if any.

If this function finds a value VAL for PROP, it returns a cons cell with VAL at the cdr. Otherwise, this function returns nil.

Source Code

;; Defined in /usr/src/emacs/lisp/minibuffer.el.gz
(defun completion-category-get (cat prop)
  "Get property PROP of completion category CAT.

This function consults `completion-category-overrides' and
`completion-category-defaults' to determine the value for PROP in CAT.
If no value is found in these variables, then this function goes over
the parent categories of CAT (specified in the definition of CAT with
`define-completion-category', which see), and chooses the first value
any of them specify (directly or via inheritance), if any.

If this function finds a value VAL for PROP, it returns a cons cell with
VAL at the `cdr'.  Otherwise, this function returns nil."
  (seq-some (lambda (c) (completion--category-override c prop))
            (completion--all-reachable-categories cat)))