[Top][All Lists]

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

Re: run/load a lisp script before user init file

From: Stephen J. Turnbull
Subject: Re: run/load a lisp script before user init file
Date: Tue, 08 Oct 2013 15:27:04 +0900

Jarek Czekalski writes:

 > **Execute all site-start files, not the first one on the path**

 > Cons:

It doesn't actually solve any problems, and makes some of them harder
to solve (eg, uninstall).  It's ugly (why should the site-start
library be treated differently from any other?[1])  It's not general
(I suspect that at the point where site-start is run, the load-path is
very short.)

What's wrong with the obvious solution?  Like this:

1. Install your script on the load-path in some application-specific file.
2. Compile it.
3. Find site-start.  If it doesn't exist yet, create an empty one.
4. Check for the presence of "(require 'my-script-file)" in
   site-start.  If it's there, you're done.  (This can be done
   accurately by using the Lisp reader to read site-start.)
5. If it's not there, append it to site-start.

[1]  Yes, I know about the package-specific auto-autoloads and
custom-load files in XEmacs.  Lesser of two uglies but still ugly.

reply via email to

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