Eclipse Lisp: init.lisp


The Eclipse top-level program calls the function clLispTopLevel, which may load zero or more init files. One option for clLispTopLevel is to search the file system for init files to load. See clLispTopLevel and "Lisp Top-Level" for information on how this is specified.

When searching for init files to load, the system will load each of the following three files, in order:

  1. (MAKE-PATHNAME :NAME "INIT" :CASE :COMMON) - This is effectively the file "init" (i.e. "init.lisp" or "init.bin") in the current working directory.
  2. "SYS:SITE;INIT" - If the first file does not change the "SYS" logical host translations, on Unix systems, this is effectively "site/init" in the eclipse home directory directory. (See "Site and Other Initial Definitions".)
  3. (MAKE-PATHNAME :NAME "INIT" :CASE :COMMON
    :DEFAULTS (USER-HOMEDIR-PATHNAME))
    On Unix systems, this is the file "~/init".
If any of the files are missing, no error is signaled, and the initialization continues.

N.B.: Eclipse does not make any special arrangements to load each file only once if any any of these result in the same truename. For example, if you started from your home directory, the first and last files would be the same. See the example, below, for a way to avoid this problem.

These files are read after system defined initialization, such as that defined in "Site and Other Initial Definitions".

Typical contents for one of these files is:

(in-package :user)
(defvar *my-init-loaded-p* nil)
(unless *my-init-loaded-p*   ;Don't reload.
  (setq *short-site-name* "WIDGETS-R-US.COM")
  (setq *long-site-name* "Widgets R Us, Incorporated, Somewhere, USA")
  (setq *default-element-type* 'base-char)
  (load "/usr/eclipse/site/sys.host")
  (setq *my-init-loaded-p* t))

[Previous] [Next] [Up] [Documentation Contents] [Eclipse Home Page]