Function: evil-get-property

evil-get-property is a byte-compiled function defined in evil-common.el.

This function is obsolete since 1.15.0.

Signature

(evil-get-property ALIST KEY &optional PROP)

Documentation

Return property PROP for KEY in ALIST.

ALIST is an association list with entries of the form
(KEY . PLIST), where PLIST is a property list.
If PROP is nil, return all properties for KEY. If KEY is t, return an association list of keys and their PROP values.

Source Code

;; Defined in ~/.emacs.d/elpa/evil-20251108.138/evil-common.el
(defun evil-get-property (alist key &optional prop)
  "Return property PROP for KEY in ALIST.
ALIST is an association list with entries of the form
\(KEY . PLIST), where PLIST is a property list.
If PROP is nil, return all properties for KEY.
If KEY is t, return an association list of keys
and their PROP values."
  (declare (obsolete nil "1.15.0"))
  (cond
   ((null prop)
    (cdr (assq key alist)))
   ((eq key t)
    (let (result val)
      (dolist (entry alist result)
        (setq key (car entry)
              val (cdr entry))
        (when (plist-member val prop)
          (setq val (plist-get val prop))
          (push (cons key val) result)))))
   (t
    (plist-get (cdr (assq key alist)) prop))))