help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Auto load at startup


From: Sébastien Kirche
Subject: Re: Auto load at startup
Date: Tue, 14 Oct 2003 10:43:42 +0200


Le lundi, 13 oct 2003, à 19:43 Europe/Paris, Kevin Rodgers a écrit :

I tried this tip that seems to work, but I would like to understand why the subdirs.el fails/isn't sufficient.

What exactly did you put in ~/.my_elisp_dir/subdirs.el that didn't work?

Well,
actually, i think after investigation that I could have fixed my problem. It was mainly a mis-understand of behaviour of emacs about the load-path :
i first added the following in my .emacs :
,----
| (if (file-exists-p "~/.elisp/" )
|   (setq load-path (cons (concat "~/.elisp/" ) load-path))
| )
`----
and that subdirs.el in ~/.elisp :
,----
| (if (fboundp 'normal-top-level-add-subdirs-to-load-path)
|     (normal-top-level-add-subdirs-to-load-path))
`----

the lisp files that were in ~/.elisp were accessible, but i found that packages in subdirs were accessibles but not pre-loaded, that was what i mis-understood.

I corrected the following like this :
,----
| ; check either Emacs or XEmacs
| (defvar is-xemacs
|   (string-match "XEmacs" emacs-version)
|   "Variable interne differente de nil si on est dans XEmacs"
| )
|
| ; add my personal elisp directory to search path + preload
| (defvar my-elisp-path "~/.elisp" "Chemin vers mes packages elisp")
| (if is-xemacs
|       (setq my-elisp-path (expand-file-name my-elisp-path))
| )
| (add-to-list 'load-path my-elisp-path)        
| (progn (cd my-elisp-path) (normal-top-level-add-subdirs-to-load-path))
`----
What do you think of that proposition ?

Thanks for any remark
Sébastien.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]