Re: [CBLX] dossier emacs.d

[ Thread Index | Date Index | More lists.tuxfamily.org/carrefourblinux Archives ]


bonjour,

Pierre a raison : il faut lire la doc. Je ne m'étais jamais vraiment penché sur les différences entre load et require. 

Du coup, j'ai chrché. Voici ce que j'ai trouvé sur http://ergoemacs.org/emacs/elisp_library_system.html

----------

This page explains emacs library system. For example, what's the difference between library, package, features? And what's the difference between {load-file, load, require, autoload}?

load-file	- Load a file - Load one specific file. (“.el” or “.elc” are not auto added, but “.gz” is.)	Use this for a SPECIFIC file.

load	- Load a file.	- Load a file by searching thru var load-path. Argument should be just the file name without full path, such as “undo”. It'll auto add “.elc” for compiled version if exist, or add “.el”, or with “.gz”.	Use this if the exact file path is not known in advance.

require	- Load a package if it has not already been loaded.- Checks the var features, if symbol is not there, then call load to load it.	Best used in elisp source code, similar to other lang's “require” or “import”.

autoload	- Load a file only when a function is called.	- Associate a function name with a file path. When the function is called, load the file, and execute the function.	If you are writing a major mode, have your package installation go by autoload if possible. It saves startup time.

---------

Cordialement

Erwin

--

   CarrefourBLinuX MailingListe
   Pour obtenir de l'aide, envoyez le sujet  help  �   carrefourblinux-request@xxxxxxxxxxxxxxxxxxx
   Archives:
   http://listengine.tuxfamily.org/lists.tuxfamily.org/carrefourblinux


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/