Add rc for mouse-copy. Require (only older?) built-in libraries in a
[emacs.d.git] / lisp / slime-rc.el
blob8fe3ae25c8d4664fe37ef6dca18771fe6760948e
1 ;;; A simple rc to configure slime.
3 ;;; A sufficiently recent slime signals an error on load when loaded
4 ;;; with a sufficiently old version of Emacs, which stops the rest of
5 ;;; Emacs' initialization. Failing silently is preferrable.
6 (when (ignore-errors (yard-require 'slime))
8 ;; Use M-x slime with a negative prefix to choose between
9 ;; implementations i.e. M-- M-x slime.
10 (setq slime-lisp-implementations
11 '((sbcl ("sbcl"))
12 (ccl ("ccl64"))))
14 (slime-setup '(slime-fancy slime-banner inferior-slime))
16 (define-key lisp-mode-map (kbd "C-c s") 'yard-slime-send-dwim)
18 ;; Prefer rocker clicks to horizontal scrolling for inspector mouse
19 ;; control.
20 (define-key slime-inspector-mode-map (kbd "<mouse-6>") nil)
21 (define-key slime-inspector-mode-map (kbd "<mouse-7>") nil)
22 (define-key slime-inspector-mode-map (kbd "<mouse-8>") 'slime-inspector-next)
23 (define-key slime-inspector-mode-map (kbd "<mouse-9>") 'slime-inspector-pop)
25 (define-key slime-repl-mode-map
26 (kbd "<mouse-1>") 'slime-inspect-presentation-at-mouse)
28 (setq slime-complete-symbol-function 'slime-fuzzy-complete-symbol)
30 ;; Unicode characters from and to Lisp.
31 (setq slime-net-coding-system 'utf-8-unix)
33 ;; Don't clobber Paredit's backspace.
34 (add-hook 'slime-repl-mode-hook
35 (lambda () (define-key slime-repl-mode-map
36 (read-kbd-macro paredit-backward-delete-key)
37 nil)))
39 ;; Use Quicklisp's HyperSpec package if available.
40 (let ((clhs-use-local (expand-file-name "~/quicklisp/clhs-use-local.el")))
41 (when (file-exists-p clhs-use-local)
42 (load clhs-use-local)
43 ;; clhs-use-local.el does not setup `common-lisp-hyperspec-root'
44 ;; robustly with respect to some possible `browse-url' values.
45 (setq common-lisp-hyperspec-root
46 (replace-regexp-in-string "file:/[^/]??"
47 "file:///"
48 common-lisp-hyperspec-root)))))