]> code.delx.au - gnu-emacs/blobdiff - lisp/cmuscheme.el
Add a couple cells to lisp-prettify-symbols-alist
[gnu-emacs] / lisp / cmuscheme.el
index f4d15689885fb50a14e47a7d90acbd4a111b817b..f61e7207b09e05dd2dc6b278a9cfc12efe23be63 100644 (file)
@@ -1,9 +1,10 @@
 ;;; cmuscheme.el --- Scheme process in a buffer. Adapted from tea.el
 
-;; Copyright (C) 1988, 1994, 1997, 2001-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1988, 1994, 1997, 2001-2016 Free Software Foundation,
+;; Inc.
 
 ;; Author: Olin Shivers <olin.shivers@cs.cmu.edu>
-;; Maintainer: FSF
+;; Maintainer: emacs-devel@gnu.org
 ;; Keywords: processes, lisp
 
 ;; This file is part of GNU Emacs.
@@ -36,7 +37,7 @@
 ;;
 ;; NOTE: MIT Cscheme, when invoked with the -emacs flag, has a special user
 ;; interface that communicates process state back to the superior emacs by
-;; outputting special control sequences. The gnumacs package, xscheme.el, has
+;; outputting special control sequences. The Emacs package, xscheme.el, has
 ;; lots and lots of special purpose code to read these control sequences, and
 ;; so is very tightly integrated with the cscheme process. The cscheme
 ;; interrupt handler and debugger read single character commands in cbreak
@@ -169,22 +170,22 @@ The following commands are available:
 
 A Scheme process can be fired up with M-x run-scheme.
 
-Customization: Entry to this mode runs the hooks on comint-mode-hook and
-inferior-scheme-mode-hook (in that order).
+Customization: Entry to this mode runs the hooks on `comint-mode-hook' and
+`inferior-scheme-mode-hook' (in that order).
 
 You can send text to the inferior Scheme process from other buffers containing
 Scheme source.
-    switch-to-scheme switches the current buffer to the Scheme process buffer.
-    scheme-send-definition sends the current definition to the Scheme process.
-    scheme-compile-definition compiles the current definition.
-    scheme-send-region sends the current region to the Scheme process.
-    scheme-compile-region compiles the current region.
-
-    scheme-send-definition-and-go, scheme-compile-definition-and-go,
-        scheme-send-region-and-go, and scheme-compile-region-and-go
+    `switch-to-scheme' switches the current buffer to the Scheme process buffer.
+    `scheme-send-definition' sends the current definition to the Scheme process.
+    `scheme-compile-definition' compiles the current definition.
+    `scheme-send-region' sends the current region to the Scheme process.
+    `scheme-compile-region' compiles the current region.
+
+    `scheme-send-definition-and-go', `scheme-compile-definition-and-go',
+        `scheme-send-region-and-go', and `scheme-compile-region-and-go'
         switch to the Scheme process buffer after sending their text.
 For information on running multiple processes in multiple buffers, see
-documentation for variable scheme-buffer.
+documentation for variable `scheme-buffer'.
 
 Commands:
 Return after the end of the process' output sends the text from the
@@ -213,7 +214,7 @@ Defaults to a regexp ignoring all inputs of 0, 1, or 2 letters."
 
 (defun scheme-input-filter (str)
   "Don't save anything matching `inferior-scheme-filter-regexp'."
-  (not (string-match inferior-scheme-filter-regexp str)))
+  (not (string-match-p inferior-scheme-filter-regexp str)))
 
 (defun scheme-get-old-input ()
   "Snarf the sexp ending at point."
@@ -232,7 +233,7 @@ If the file `~/.emacs_SCHEMENAME' or `~/.emacs.d/init_SCHEMENAME.scm' exists,
 it is given as initial input.
 Note that this may lose due to a timing error if the Scheme processor
 discards input when it starts up.
-Runs the hook `inferior-scheme-mode-hook' \(after the `comint-mode-hook'
+Runs the hook `inferior-scheme-mode-hook' (after the `comint-mode-hook'
 is run).
 \(Type \\[describe-mode] in the process buffer for a list of commands.)"
 
@@ -246,13 +247,12 @@ is run).
        (inferior-scheme-mode)))
   (setq scheme-program-name cmd)
   (setq scheme-buffer "*scheme*")
-  (pop-to-buffer "*scheme*"))
-;;;###autoload (add-hook 'same-window-buffer-names (purecopy "*scheme*"))
+  (pop-to-buffer-same-window "*scheme*"))
 
 (defun scheme-start-file (prog)
   "Return the name of the start file corresponding to PROG.
-Search in the directories \"~\" and \"~/.emacs.d\", in this
-order.  Return nil if no start file found."
+Search in the directories \"~\" and `user-emacs-directory',
+in this order.  Return nil if no start file found."
   (let* ((progname (file-name-nondirectory prog))
         (start-file (concat "~/.emacs_" progname))
         (alt-start-file (concat user-emacs-directory "init_" progname ".scm")))
@@ -367,12 +367,12 @@ For Scheme 48 and Scsh use \",expand %s\"."
         (scheme-form-at-point)))))
 
 (defun switch-to-scheme (eob-p)
-  "Switch to the scheme process buffer.
+  "Switch to the Scheme process buffer.
 With argument, position cursor at end of buffer."
   (interactive "P")
   (if (or (and scheme-buffer (get-buffer scheme-buffer))
           (scheme-interactively-start-process))
-      (pop-to-buffer scheme-buffer)
+      (pop-to-buffer-same-window scheme-buffer)
     (error "No current process buffer.  See variable `scheme-buffer'"))
   (when eob-p
     (push-mark)
@@ -430,7 +430,7 @@ in the next one.")
                                       (file-name-nondirectory file-name)))
   (comint-send-string (scheme-proc) (concat "(load \""
                                            file-name
-                                           "\"\)\n")))
+                                           "\")\n")))
 
 (defun scheme-compile-file (file-name)
   "Compile a Scheme file FILE-NAME in the inferior Scheme process."
@@ -444,10 +444,10 @@ in the next one.")
                                       (file-name-nondirectory file-name)))
   (comint-send-string (scheme-proc) (concat "(compile-file \""
                                            file-name
-                                           "\"\)\n")))
+                                           "\")\n")))
 
 \f
-(defvar scheme-buffer nil "*The current scheme process buffer.
+(defvar scheme-buffer nil "The current scheme process buffer.
 
 MULTIPLE PROCESS SUPPORT
 ===========================================================================
@@ -478,8 +478,8 @@ This process selection is performed by function `scheme-proc'.
 
 Whenever \\[run-scheme] fires up a new process, it resets `scheme-buffer'
 to be the new process's buffer.  If you only run one process, this will
-do the right thing.  If you run multiple processes, you can change
-`scheme-buffer' to another process buffer with \\[set-variable].
+do the right thing.  If you run multiple processes, you might need to
+set `scheme-buffer' to whichever process buffer you want to use.
 
 More sophisticated approaches are, of course, possible.  If you find yourself
 needing to switch back and forth between multiple processes frequently,