https://wikemacs.org/api.php?action=feedcontributions&user=193.52.24.14&feedformat=atomWikEmacs - User contributions [en]2024-03-28T13:02:16ZUser contributionsMediaWiki 1.35.14https://wikemacs.org/index.php?title=Scheme&diff=2796Scheme2012-05-01T10:15:32Z<p>193.52.24.14: /* Quack */ Add section, link, description.</p>
<hr />
<div>Scheme is a functional programming language of the [[lisp]] family. Praised for its minimalist design, Scheme also pioneers the [[lexical scope]], tail-call optimization and first class continuation.<br />
<br />
== Implementation ==<br />
<br />
=== Guile ===<br />
[[Guile]] is the GNU Ubiquitous Intelligent Language for Extensions, the official extension language for the GNU operating system.<br />
<br />
=== Racket ===<br />
Formerly known as PLT Scheme<br />
<br />
== Major Mode for editing Scheme == <br />
=== Scheme mode ===<br />
Emacs has built-in Scheme Mode. It provides basic features, such as syntax highlighting etc. <br />
<br />
=== Geiser ===<br />
Geiser is a collection of Emacs major and minor mode, that can help Emacs to communicate to a foreign Scheme interpreter. It provides [[SLIME]]-like support for Racket and Guile. <br />
<br />
Example config may look like this:<br />
<syntaxhighlight lang="lisp"><br />
(defun turn-on-parenthesis-goodies () (rainbow-delimiters-mode 1) (paredit-mode 1))<br />
(add-hook 'scheme-mode-hook 'turn-on-parenthesis-goodies)<br />
(load-file "C:/path-to-geiser/elisp/geiser.el")<br />
(setq geiser-active-implementations '(racket))<br />
(setq geiser-racket-binary "C:/path-to-racket/racket.exe")<br />
(require 'quack)<br />
</syntaxhighlight><br />
<br />
=== Quack ===<br />
[http://www.neilvandyke.org/quack/ Quack] is a package that enhance Emacs support for Scheme. It supports many different interpreters such as Guile, Racket, etc. Geiser uses its own Quack version and, thus, makes Quack alone a good light alternative.<br />
<br />
When you have installed it, you can add these lines to your .emacs file:<br />
<syntaxhighlight lang="lisp"><br />
;; The binary of your interpreter<br />
(setq scheme-program-name "racket")<br />
<br />
;; This hook lets you use your theme colours instead of quack's ones.<br />
(defun scheme-mode-quack-hook ()<br />
(require 'quack)<br />
(setq quack-fontify-style 'emacs))<br />
(add-hook 'scheme-mode-hook 'scheme-mode-quack-hook)<br />
</syntaxhighlight><br />
<br />
== Minor Mode for editing Scheme ==<br />
<br />
* [http://mumble.net/~campbell/emacs/paredit.el ParEdit] is a mode for structured editing of [[S-expression]]s. Useful with any Lisp.<br />
* [https://github.com/jlr/rainbow-delimiters RainbowDelimiters] highlights parentheses, brackets, and braces according to their depth, each level in a different colour. Also available in [[ELPA]].<br />
<br />
<br />
== Useful Links ==<br />
* [http://docs.racket-lang.org/guide/Emacs.html Racket documentation on Emacs as IDE]<br />
<br />
[[Category:Lisp]]</div>193.52.24.14