File: slime-autoloads.el

package info (click to toggle)
slime 1:20100722-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 4,400 kB
  • ctags: 6,658
  • sloc: lisp: 37,391; ruby: 321; sh: 161; makefile: 126; awk: 10
file content (57 lines) | stat: -rw-r--r-- 1,593 bytes parent folder | download | duplicates (2)
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
53
54
55
56
57
;;; 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))
(defvar slime-setup-contribs nil
  "List of contribst to load.
Modified my slime-setup.")

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

(slime-setup)

(provide 'slime-autoloads)

;;; slime-autoloads.el ends here