Function: object-assoc-list

object-assoc-list is a byte-compiled function defined in eieio.el.gz.

Signature

(object-assoc-list SLOT LIST)

Documentation

Return an association list with the contents of SLOT as the key element.

LIST must be a list of objects with SLOT in it. This is useful when you need to do completing read on an object group.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/eieio.el.gz
(defun object-assoc-list (slot list)
  "Return an association list with the contents of SLOT as the key element.
LIST must be a list of objects with SLOT in it.
This is useful when you need to do completing read on an object group."
  (cl-check-type list list)
  (let ((assoclist nil))
    (while list
      (setq assoclist (cons (cons (eieio-oref (car list) slot)
				  (car list))
			    assoclist))
      (setq list (cdr list)))
    (nreverse assoclist)))