Function: feature-file

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

Signature

(feature-file FEATURE)

Documentation

Return the file name from which a given FEATURE was loaded.

Actually, return the load argument, if any; this is sometimes the name of a Lisp file without an extension. If the feature came from an eval-buffer on a buffer with no associated file, or an eval-region, return nil.

Source Code

;; Defined in /usr/src/emacs/lisp/loadhist.el.gz
(defun feature-file (feature)
  "Return the file name from which a given FEATURE was loaded.
Actually, return the load argument, if any; this is sometimes the name of a
Lisp file without an extension.  If the feature came from an `eval-buffer' on
a buffer with no associated file, or an `eval-region', return nil."
  (if (not (featurep feature))
      (error "%S is not a currently loaded feature" feature)
    (car (feature-symbols feature))))