Page 1 of 1

auto loading a file

Posted: Sun Nov 13, 2011 1:03 pm
by ilia1987
How do I autoload a .lisp file every time I start clisp with slime?

I tried making
(setq inferior-lisp-program "clisp -i /home/ilia/.clisp")
and then putting (setq *print-circle* t)
in the ~/.clisp file
but every time I start M-x slime , and typing
*print-circle* into the REPL, it prints nil
please help, my lisp experimentation has caused my computer to crash too many times :)

here's my .emacs:

Code: Select all

; LISP (slime)
(setq inferior-lisp-program "clisp -i /home/ilia/.clisp")
(add-to-list 'load-path "~/.slime")
(require 'slime)

; Additional settings for lisp
(global-font-lock-mode t)
(show-paren-mode 1)
(add-hook 'lisp-mode-hook '(lambda ()
	(local-set-key (kbd "RET") 'newline-and-indent)))


Re: auto loading a file

Posted: Mon Nov 14, 2011 2:43 pm
by Kompottkin
Put the expressions to be executed into a file called ~/.clisprc.lisp. CLISP should read it on launch by default.

Re: auto loading a file

Posted: Tue Nov 15, 2011 8:41 am
by ilia1987
thank you, it worked