Go to the first, previous, next, last section, table of contents.


Features

Features correspond to modules of the editor. 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). 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: provide feature
Adds feature (a symbol) to the list of features present. A call to this function is normally one of the top-level forms in a module.

;;;; maths.jl -- the maths module

(provide 'maths)
...

Command: 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 non-nil it specifies the first argument to the load function, else the print name of the symbol feature is used.

;;;; physics.jl -- the physics module

(require 'maths)                ;Need the maths module
(provide 'physics)
...

When called interactively the symbol feature is prompted for.


Go to the first, previous, next, last section, table of contents.