/[slime]/slime/contrib/slime-scheme.el
ViewVC logotype

Contents of /slime/contrib/slime-scheme.el

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations)
Wed Jun 15 09:13:21 2011 UTC (2 years, 10 months ago) by sboukarev
Branch: MAIN
CVS Tags: SLIME-2-3, FAIRLY-STABLE, byte-stream, HEAD
Changes since 1.1: +1 -1 lines
* slime-scheme.el (slime-scheme-indentation-update):
`slime-indentation-update-hooks' now requires functions to accept
three arguments. Add `packages' parameter.
1 ;;; slime-scheme.el --- Support Scheme programs running under Common Lisp
2 ;;
3 ;; Authors: Matthias Koeppe <mkoeppe@mail.math.uni-magdeburg.de>
4 ;;
5 ;; License: GNU GPL (same license as Emacs)
6 ;;
7 ;;; Installation:
8 ;;
9 ;; Add this to your .emacs:
10 ;;
11 ;; (add-to-list 'load-path "<directory-of-this-file>")
12 ;; (add-hook 'slime-load-hook (lambda () (require 'slime-scheme)))
13 ;;
14
15 (defun slime-scheme-mode-hook ()
16 (slime-mode 1))
17
18 (defun slime-scheme-indentation-update (symbol indent packages)
19 ;; Does the symbol have an indentation value that we set?
20 (when (equal (get symbol 'scheme-indent-function)
21 (get symbol 'slime-scheme-indent))
22 (put symbol 'slime-scheme-indent indent)
23 (put symbol 'scheme-indent-function indent)))
24
25
26 ;;; Initialization
27
28 (defun slime-scheme-init ()
29 (add-hook 'scheme-mode-hook 'slime-scheme-mode-hook)
30 (add-hook 'slime-indentation-update-hooks 'slime-scheme-indentation-update)
31 (add-to-list 'slime-lisp-modes 'scheme-mode))
32
33 (defun slime-scheme-unload ()
34 (remove-hook 'scheme-mode-hook 'slime-scheme-mode-hook)
35 (remove-hook 'slime-indentation-update-hooks 'slime-scheme-indentation-update)
36 (setq slime-lisp-modes (remove 'scheme-mode slime-lisp-modes)))
37
38 (provide 'slime-scheme)

  ViewVC Help
Powered by ViewVC 1.1.5