/[emacs]/emacs/lispref/loading.texi
ViewVC logotype

Diff of /emacs/lispref/loading.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.33 by rms, Wed Jan 16 02:47:15 2002 UTC revision 1.34 by monnier, Sun Jun 23 21:49:42 2002 UTC
# Line 637  The compiler ignores the @code{provide}, Line 637  The compiler ignores the @code{provide},
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
# Line 648  the front of the list @code{features} if Line 648  the front of the list @code{features} if
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)
# Line 681  signals an error, @samp{Required feature Line 684  signals an error, @samp{Required feature
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
# Line 796  This function arranges to evaluate @var{ Line 802  This function arranges to evaluate @var{
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}.

Legend:
Removed from v.1.33  
changed lines
  Added in v.1.34

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26