Function: file-requires

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

Signature

(file-requires FILE)

Documentation

Return the list of features required by FILE as it was loaded.

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-requires (file)
  "Return the list of features required by FILE as it was loaded.
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 (requires)
    (dolist (x (file-loadhist-lookup file) requires)
      (when (eq (car-safe x) 'require)
	(push (cdr x) requires)))))