41 lines
1.2 KiB
EmacsLisp
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

;;; slime-scheme.el --- Support Scheme programs running under Common Lisp
;;
;; Authors: Matthias Koeppe <mkoeppe@mail.math.uni-magdeburg.de>
;;
;; License: GNU GPL (same license as Emacs)
;;
;;; Installation:
;;
;; Add this to your .emacs:
;;
;; (add-to-list 'load-path "<directory-of-this-file>")
;; (add-hook 'slime-load-hook (lambda () (require 'slime-scheme)))
;;
(eval-and-compile
(require 'slime))
(defun slime-scheme-mode-hook ()
(slime-mode 1))
(defun slime-scheme-indentation-update (symbol indent packages)
;; Does the symbol have an indentation value that we set?
(when (equal (get symbol 'scheme-indent-function)
(get symbol 'slime-scheme-indent))
(put symbol 'slime-scheme-indent indent)
(put symbol 'scheme-indent-function indent)))
;;; Initialization
(defun slime-scheme-init ()
(add-hook 'scheme-mode-hook 'slime-scheme-mode-hook)
(add-hook 'slime-indentation-update-hooks 'slime-scheme-indentation-update)
(add-to-list 'slime-lisp-modes 'scheme-mode))
(defun slime-scheme-unload ()
(remove-hook 'scheme-mode-hook 'slime-scheme-mode-hook)
(remove-hook 'slime-indentation-update-hooks 'slime-scheme-indentation-update)
(setq slime-lisp-modes (remove 'scheme-mode slime-lisp-modes)))
(provide 'slime-scheme)