auto loading a file

Discussion of programming Lisps using Emacs, including SLIME and other tools
Post Reply
ilia1987
Posts: 2
Joined: Sun Nov 13, 2011 12:56 pm

auto loading a file

Post by ilia1987 » Sun Nov 13, 2011 1:03 pm

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)
(slime-setup)

; 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)))

]

Kompottkin
Posts: 94
Joined: Mon Jul 21, 2008 7:26 am
Location: München, Germany
Contact:

Re: auto loading a file

Post by Kompottkin » Mon Nov 14, 2011 2:43 pm

Put the expressions to be executed into a file called ~/.clisprc.lisp. CLISP should read it on launch by default.

ilia1987
Posts: 2
Joined: Sun Nov 13, 2011 12:56 pm

Re: auto loading a file

Post by ilia1987 » Tue Nov 15, 2011 8:41 am

thank you, it worked

Post Reply