Re: [CBLX] dossier emacs.d |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/carrefourblinux Archives
]
From: erwin <erwinb@xxxxxxxxxx>
Subject: Re: [CBLX] dossier emacs.d
Date: Fri, 25 Jul 2014 09:46:17 +0200
> 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
Ouaipf mais vaut quand même mieux toujours s'adresser à Dieu
qu'à ses saints et tout ça c'est dans la doc officiellle
d'emacs accessible avec C-h i sous emacs.
P.
>
> ----------
>
> 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
>
--
CarrefourBLinuX MailingListe
Pour obtenir de l'aide, envoyez le sujet help �
carrefourblinux-request@xxxxxxxxxxxxxxxxxxx
Archives:
http://listengine.tuxfamily.org/lists.tuxfamily.org/carrefourblinux