Function: auth-source-search-backends
auth-source-search-backends is a byte-compiled function defined in
auth-source.el.gz.
Signature
(auth-source-search-backends BACKENDS SPEC MAX CREATE DELETE REQUIRE)
Source Code
;; Defined in /usr/src/emacs/lisp/auth-source.el.gz
(defun auth-source-search-backends (backends spec max create delete require)
(let ((max (if (zerop max) 1 max)) ; stop with 1 match if we're asked for zero
matches)
(dolist (backend backends)
(when (> max (length matches)) ; if we need more matches...
(let* ((bmatches (apply
(slot-value backend 'search-function)
:backend backend
:type (slot-value backend 'type)
;; note we're overriding whatever the spec
;; has for :max, :require, :create, and :delete
:max max
:require require
:create create
:delete delete
spec)))
(when bmatches
(auth-source-do-trivia
"auth-source-search-backend: got %d (max %d) in %s:%s matching %S"
(length bmatches) max
(slot-value backend 'type)
(slot-value backend 'source)
spec)
(setq matches (append matches bmatches))))))
matches))