Monday, January 09, 2006

A SLIME/Emacs Conversion

Thank you Marco Baringer! You've convinced me to learn Emacs/SLIME. Since I only have a WinXP machine, I am using Cygwin/X and CLISP, which is included. I decided to go with emacs-X11 because Cygwin's Emacs (terminal) has this unfortunate problem.

My fear of Emacs's steep learning curve has not been realized so far. 'C-h t' (the tutorial) is easier for me to follow than vim's modal-editing walk-thru. Dare I say it? Learning Emacs is more fun than I expected, even without keywiz.el!

My current .emacs dotfile:
;; disable loading of default.el at startup
(setq inhibit-default-init t)

;; name of host and current path/file in title bar
(require 'dired)
(setq frame-title-format
(list (format "%s %%S: %%j " (system-name))
'(buffer-file-name "%f" ("%b"))))

;; disable the toolbar
(tool-bar-mode -1)

;; replace y-e-s by y
(fset 'yes-or-no-p 'y-or-n-p)

;; colorize all buffers / syntax coloring
(global-font-lock-mode t)

;; put scroll bars on the right
(set-scroll-bar-mode 'right)

;; turn on mouse wheel scrolling--works on many systems
(if (load "mwheel" t)
(mwheel-install))

;; column-number-mode
(column-number-mode t)

;; SLIME
(add-to-list 'load-path (expand-file-name "~/slime/"))
(require 'slime)

(add-hook 'lisp-mode-hook (lambda () (slime-mode t)))
(add-hook 'inferior-lisp-mode-hook (lambda () (inferior-slime-mode t)))
(setq inferior-lisp-program "/bin/clisp"
lisp-indent-function 'common-lisp-indent-function
slime-complete-symbol-function 'slime-fuzzy-complete-symbol
common-lisp-hyperspec-root (expand-file-name "~/HyperSpec/")
slime-startup-animation nil)

(setf paren-priority 'close)

(setf slime-save-buffers nil)

(slime-setup :autodoc t)
(global-set-key "\C-cs" 'slime-selector)

;; enable visual feedback on selections
(setq transient-mark-mode t)

;; highlight parens & colorize
(show-paren-mode 1)

;; start directory
(find-file "~/")
A minor annoyance is not being able to figure out why 'M-x slime' results in a path error if I include (setf default-directory "~/") in my .emacs file. Somehow SLIME looks for cygcrypt-0.dll (which is in /cygwin/bin/) in /cygwin/cygdrive/c/Documen~/Peatey/Local~/temp/.

0 Comments:

Post a Comment

<< Home