Setting up an initialization file for CLISP on Windows

August 8th, 2007 at 6:49 pm

CLISP, like other CL implementations, loads an initialization file on start-up. This file is called .clisprc and must be located in the user’s home directory, which is C:\ by default on Windows. There are a couple of tips to make this work in an optimal way:

  1. It is possible to create a HOME environment variable on Windows, to change the default home directory from C:\. Right click on the My Computer desktop icon -> Advanced -> Environment variables, and create a new variable, calling it HOME. I set it to C:\eli\home
  2. Now go to the directory chosen as HOME and create a new file named .clisprc. Windows might be reluctant to let you do it (because by its standards, it doesn’t have a name, only an extension). So create a dummy file (say xxxx), then “cmd” into the directory and execute mv xxxx .clisprc. This should work.
  3. Edit .clisprc, and add this line to make sure it works:
    
    (print "Hi from .clisprc")
    

    Now, when you run your CLISP it will hopefully print out something like:

    
    ;; Loading file C:\eli\home\.clisprc ...
    "Hi from .clisprc"
    ;; Loaded file C:\eli\home\.clisprc
    [1]>
    

Related posts:

  1. Bison looking for bison.simple on Windows
  2. Variable initialization in C++
  3. irb tab completion
  4. Windows automation with AutoHotKey
  5. Integrating the Platform SDK into MS Visual C++ Express

Leave a Reply

To post code with preserved formatting, enclose it in `backticks` (even multiple lines)