Function: read-feature

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

Signature

(read-feature PROMPT &optional LOADED-P)

Documentation

Read feature name from the minibuffer, prompting with string PROMPT.

If optional second arg LOADED-P is non-nil, the feature must be loaded from a file.

Source Code

;; Defined in /usr/src/emacs/lisp/loadhist.el.gz
(defun read-feature (prompt &optional loaded-p)
  "Read feature name from the minibuffer, prompting with string PROMPT.
If optional second arg LOADED-P is non-nil, the feature must be loaded
from a file."
  (intern (completing-read
           prompt
           (mapcar #'symbol-name
                   (if loaded-p
                       (delq nil
                             (mapcar
                              (lambda (x) (and (feature-file x) x))
                              features))
                     features)))))