637 |
execute the @code{provide} call, so the subsequent @code{require} call |
execute the @code{provide} call, so the subsequent @code{require} call |
638 |
does nothing when the file is loaded. |
does nothing when the file is loaded. |
639 |
|
|
640 |
@defun provide feature |
@defun provide feature &optional subfeatures |
641 |
This function announces that @var{feature} is now loaded, or being |
This function announces that @var{feature} is now loaded, or being |
642 |
loaded, into the current Emacs session. This means that the facilities |
loaded, into the current Emacs session. This means that the facilities |
643 |
associated with @var{feature} are or will be available for other Lisp |
associated with @var{feature} are or will be available for other Lisp |
648 |
The argument @var{feature} must be a symbol. @code{provide} returns |
The argument @var{feature} must be a symbol. @code{provide} returns |
649 |
@var{feature}. |
@var{feature}. |
650 |
|
|
651 |
|
If provided, @var{subfeatures} should be a list of symbols indicating |
652 |
|
a set of specific subfeatures provided by this version of @var{feature}. |
653 |
|
|
654 |
@smallexample |
@smallexample |
655 |
features |
features |
656 |
@result{} (bar bish) |
@result{} (bar bish) |
684 |
provided}, unless @var{noerror} is non-@code{nil}. |
provided}, unless @var{noerror} is non-@code{nil}. |
685 |
@end defun |
@end defun |
686 |
|
|
687 |
@defun featurep feature |
@defun featurep feature &optional subfeature |
688 |
This function returns @code{t} if @var{feature} has been provided in the |
This function returns @code{t} if @var{feature} has been provided in the |
689 |
current Emacs session (i.e., if @var{feature} is a member of |
current Emacs session (i.e., if @var{feature} is a member of |
690 |
@code{features}.) |
@code{features}.) If @var{subfeature} is non-nil, then the function |
691 |
|
returns @code{t} only if that subfeature is provided as well (i.e. |
692 |
|
if @var{subfeature} is a member of the @var{subfeature} property |
693 |
|
of the @var{feature} symbol.) |
694 |
@end defun |
@end defun |
695 |
|
|
696 |
@defvar features |
@defvar features |
802 |
library @var{library}, if and when @var{library} is loaded. If |
library @var{library}, if and when @var{library} is loaded. If |
803 |
@var{library} is already loaded, it evaluates @var{form} right away. |
@var{library} is already loaded, it evaluates @var{form} right away. |
804 |
|
|
805 |
The library name @var{library} must exactly match the argument of |
If @var{library} is a string, it must exactly match the argument of |
806 |
@code{load}. To get the proper results when an installed library is |
@code{load} used to load the library. To get the proper results when an |
807 |
found by searching @code{load-path}, you should not include any |
installed library is found by searching @code{load-path}, you should not |
808 |
directory names in @var{library}. |
include any directory names in @var{library}. |
809 |
|
|
810 |
|
@var{library} can also be a feature (i.e. a symbol), in which case, |
811 |
|
@var{form} is evaluated when @code{(provide @var{library})} is called. |
812 |
|
|
813 |
An error in @var{form} does not undo the load, but does prevent |
An error in @var{form} does not undo the load, but does prevent |
814 |
execution of the rest of @var{form}. |
execution of the rest of @var{form}. |