Function: compat--completion-metadata-get
compat--completion-metadata-get is a byte-compiled function defined in
compat-30.el.
Signature
(compat--completion-metadata-get METADATA PROP)
Documentation
[Compatibility function for completion-metadata-get, defined in Emacs
30.1. See (compat) Emacs 30.1' for more details.]
Get property PROP from completion METADATA. If the metadata specifies a
completion category, the variables completion-category-overrides and
completion-category-defaults take precedence for category-specific overrides.
If the completion metadata does not specify the property, the
completion-extra-properties plist is consulted. Note that the keys of the
completion-extra-properties plist are keyword symbols, not plain symbols.
Source Code
;; Defined in ~/.emacs.d/elpa/compat-30.1.0.1/compat-30.el
(compat-defun completion-metadata-get (metadata prop) ;; <compat-tests:completion-metadata-get>
"Get property PROP from completion METADATA.
If the metadata specifies a completion category, the variables
`completion-category-overrides' and
`completion-category-defaults' take precedence for
category-specific overrides. If the completion metadata does not
specify the property, the `completion-extra-properties' plist is
consulted. Note that the keys of the
`completion-extra-properties' plist are keyword symbols, not
plain symbols."
:extended t
(if-let ((cat (and (not (eq prop 'category))
(completion--metadata-get-1 metadata 'category)))
(over (completion--category-override cat prop)))
(cdr over)
(completion--metadata-get-1 metadata prop)))