frameset.el (frameset--jump-to-register): Check that buffer is live (bug#16749).
[bpt/emacs.git] / lisp / progmodes / scheme.el
index 1a15f9e..81af43d 100644 (file)
@@ -1,7 +1,7 @@
 ;;; scheme.el --- Scheme (and DSSSL) editing mode
 
-;; Copyright (C) 1986-1988, 1997-1998, 2001-2012
-;;   Free Software Foundation, Inc.
+;; Copyright (C) 1986-1988, 1997-1998, 2001-2014 Free Software
+;; Foundation, Inc.
 
 ;; Author: Bill Rozas <jinx@martigny.ai.mit.edu>
 ;; Adapted-by: Dave Love <d.love@dl.ac.uk>
@@ -210,9 +210,7 @@ start an inferior Scheme using the more general `cmuscheme' package.
 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
@@ -310,8 +308,10 @@ See `run-hooks'."
        "(" (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:
@@ -330,6 +330,10 @@ See `run-hooks'."
       ;;
       ;; 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.")
 
@@ -410,6 +414,7 @@ that variable's value is a string."
 (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
@@ -535,6 +540,7 @@ indentation."
 (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)