Features
--------
"Features" correspond to libraries of Lisp code. Each feature is
loaded separately. Each feature has a name, when a certain feature is
required its user asks for it to be present (with the `require'
function), the feature may then be used as normal.
When a feature is loaded one of the top-level forms evaluated is a
call to the `provide' function. This names the feature and installs it
into the list of present features.
- Variable: features
A list of the features currently present (that is, loaded) in the
current module. Each feature is represented by a symbol. Usually
the print name of the symbol (the name of the feature) is the same
as the name of the file it was loaded from, minus any `.jl' or
`.jlc' suffix.
features
=> (info isearch fill-mode texinfo-mode lisp-mode xc)
- Function: featurep feature
Returns true if the feature FEATURE has been loaded into the
current module.
- Function: provide feature
Adds FEATURE (a symbol) to the list of loaded features. A call to
this function is normally one of the top-level forms in a file.
;;;; maths.jl -- the `maths' library
(provide 'maths)
...
- Function: require feature #!optional file
Show that the caller is planning to use the feature FEATURE (a
symbol). This function will check the `features' variable to see
if FEATURE is already loaded, if so it will return immediately.
If FEATURE is not present it will be loaded. If FILE is given it
specifies the first argument to the `load' function, else the
print name of the symbol FEATURE is used, with any `.' characters
replaced by the operating system's directory separator (Note:Module Loading).
;;;; physics.jl -- the `physics' library
(require 'maths) ;Need the `maths' library
(provide 'physics)
...
When called interactively the symbol FEATURE is prompted for.
Features may also be provided by modules, for more details Note:Module Loading.