Function: file-dependents

file-dependents is a byte-compiled function defined in loadhist.el.gz.

Signature

(file-dependents FILE)

Documentation

Return the list of loaded libraries that depend on FILE.

This can include FILE itself. FILE can be a file name, or a library name. A library name is equivalent to the file name that load-library would load.

Source Code

;; Defined in /usr/src/emacs/lisp/loadhist.el.gz
(defun file-dependents (file)
  "Return the list of loaded libraries that depend on FILE.
This can include FILE itself.
FILE can be a file name, or a library name.
A library name is equivalent to the file name that `load-library' would load."
  (let ((provides (file-provides file))
	(dependents nil))
    (dolist (x load-history dependents)
      (when (and (stringp (car x))
                 (seq-intersection provides (file-requires (car x)) #'eq))
	(push (car x) dependents)))))