-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathslime-autoloads.el
52 lines (36 loc) · 1.45 KB
/
slime-autoloads.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
;;; slime-autoloads.el --- autoload definitions for SLIME
;; Copyright (C) 2007 Helmut Eller
;; This file is protected by the GNU GPLv2 (or later), as distributed
;; with GNU Emacs.
;;; Commentary:
;; This code defines the necessary autoloads, so that we don't need to
;; load everything from .emacs.
;;; Code:
(autoload 'slime "slime"
"Start a Lisp subprocess and connect to its Swank server." t)
(autoload 'slime-mode "slime"
"SLIME: The Superior Lisp Interaction (Minor) Mode for Emacs." t)
(autoload 'slime-connect "slime"
"Connect to a running Swank server." t)
(autoload 'hyperspec-lookup "hyperspec" nil t)
(autoload 'slime-lisp-mode-hook "slime")
(autoload 'slime-scheme-mode-hook "slime")
(defvar slime-lisp-modes '(lisp-mode))
(defun slime-setup (&optional contribs)
"Setup Emacs so that lisp-mode buffers always use SLIME.
CONTRIBS is a list of contrib packages to load."
(when (member 'lisp-mode slime-lisp-modes)
(add-hook 'lisp-mode-hook 'slime-lisp-mode-hook))
(setq slime-setup-contribs contribs)
(add-hook 'slime-load-hook 'slime-setup-contribs))
(defvar slime-setup-contribs nil)
(defun slime-setup-contribs ()
(when slime-setup-contribs
(add-to-list 'load-path (expand-file-name "contrib" slime-path))
(dolist (c slime-setup-contribs)
(require c)
(let ((init (intern (format "%s-init" c))))
(when (fboundp init)
(funcall init))))))
(provide 'slime-autoloads)
;;; slime-autoloads.el ends here