;;; scheme.el --- Scheme (and DSSSL) editing mode
-;; Copyright (C) 1986-1988, 1997-1998, 2001-2011
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1986-1988, 1997-1998, 2001-2013 Free Software
+;; Foundation, Inc.
;; Author: Bill Rozas <jinx@martigny.ai.mit.edu>
;; Adapted-by: Dave Love <d.love@dl.ac.uk>
In addition, if an inferior Scheme process is running, some additional
commands will be defined, for evaluating expressions and controlling
the interpreter, and the state of the process will be displayed in the
-modeline of all Scheme buffers. The names of commands that interact
+mode line of all Scheme buffers. The names of commands that interact
with the Scheme process start with \"xscheme-\" if you use the MIT
Scheme-specific `xscheme' package; for more information see the
documentation for `xscheme-interaction-mode'. Use \\[run-scheme] to
(defcustom dsssl-sgml-declaration
"<!DOCTYPE style-sheet PUBLIC \"-//James Clark//DTD DSSSL Style Sheet//EN\">
"
- "*An SGML declaration for the DSSSL file.
+ "An SGML declaration for the DSSSL file.
If it is defined as a string this will be inserted into an empty buffer
which is in `dsssl-mode'. It is typically James Clark's style-sheet
doctype, as required for Jade."
;; This is shared by cmuscheme and xscheme.
(defcustom scheme-program-name "scheme"
- "*Program invoked by the `run-scheme' command."
+ "Program invoked by the `run-scheme' command."
:type 'string
:group 'scheme)
\f
(defvar calculate-lisp-indent-last-sexp)
-;; Copied from lisp-indent-function, but with gets of
-;; scheme-indent-{function,hook}.
+
+;; FIXME this duplicates almost all of lisp-indent-function.
+;; Extract common code to a subroutine.
(defun scheme-indent-function (indent-point state)
+ "Scheme mode function for the value of the variable `lisp-indent-function'.
+This behaves like the function `lisp-indent-function', except that:
+
+i) it checks for a non-nil value of the property `scheme-indent-function'
+\(or the deprecated `scheme-indent-hook'), rather than `lisp-indent-function'.
+
+ii) if that property specifies a function, it is called with three
+arguments (not two), the third argument being the default (i.e., current)
+indentation."
(let ((normal-indent (current-column)))
(goto-char (1+ (elt state 1)))
(parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t)