;;; scheme.el --- Scheme (and DSSSL) editing mode
-;; Copyright (C) 1986-1988, 1997-1998, 2001-2013 Free Software
+;; Copyright (C) 1986-1988, 1997-1998, 2001-2014 Free Software
;; Foundation, Inc.
;; Author: Bill Rozas <jinx@martigny.ai.mit.edu>
Commands:
Delete converts tabs to spaces as it moves back.
Blank lines separate paragraphs. Semicolons start comments.
-\\{scheme-mode-map}
-Entry to this mode calls the value of `scheme-mode-hook'
-if that value is non-nil."
+\\{scheme-mode-map}"
(scheme-mode-variables))
(defgroup scheme nil
"(" (regexp-opt
'("begin" "call-with-current-continuation" "call/cc"
"call-with-input-file" "call-with-output-file" "case" "cond"
- "do" "else" "for-each" "if" "lambda"
+ "do" "else" "for-each" "if" "lambda" "λ"
"let" "let*" "let-syntax" "letrec" "letrec-syntax"
+ ;; R6RS library subforms.
+ "export" "import"
;; SRFI 11 usage comes up often enough.
"let-values" "let*-values"
;; Hannes Haug <hannes.haug@student.uni-tuebingen.de> wants:
;;
;; Scheme `:' and `#:' keywords as builtins.
'("\\<#?:\\sw+\\>" . font-lock-builtin-face)
+ ;; R6RS library declarations.
+ '("(\\(\\<library\\>\\)\\s-*(?\\(\\sw+\\)?"
+ (1 font-lock-keyword-face)
+ (2 font-lock-type-face))
)))
"Gaudy expressions to highlight in Scheme modes.")
(put 'make 'scheme-indent-function 1)
(put 'style 'scheme-indent-function 1)
(put 'root 'scheme-indent-function 1)
+(put 'λ 'scheme-indent-function 1)
(defvar dsssl-font-lock-keywords
(eval-when-compile
(put 'letrec-syntax 'scheme-indent-function 1)
(put 'syntax-rules 'scheme-indent-function 1)
(put 'syntax-case 'scheme-indent-function 2) ; not r5rs
+(put 'library 'scheme-indent-function 1) ; R6RS
(put 'call-with-input-file 'scheme-indent-function 1)
(put 'with-input-from-file 'scheme-indent-function 1)