]> git.eshelyaron.com Git - emacs.git/commitdiff
* progmodes/scheme.el (would-be-symbol, next-sexp-as-string):
authorLeo Liu <sdl.web@gmail.com>
Thu, 24 Apr 2014 15:34:26 +0000 (23:34 +0800)
committerLeo Liu <sdl.web@gmail.com>
Thu, 24 Apr 2014 15:34:26 +0000 (23:34 +0800)
Comment out unused functions.

* progmodes/xscheme.el (xscheme-expressions-ring)
(xscheme-expressions-ring-yank-pointer, xscheme-running-p)
(xscheme-control-g-disabled-p, xscheme-process-filter-state)
(xscheme-allow-output-p, xscheme-prompt)
(xscheme-string-accumulator, xscheme-mode-string): Use defvar-local.

lisp/ChangeLog
lisp/progmodes/scheme.el
lisp/progmodes/xscheme.el

index 831c6e659c946ec548a7676d64b0939ec20ba612..6e5ad6ba29b44b886855dd158c431487064c2cf2 100644 (file)
@@ -1,3 +1,14 @@
+2014-04-24  Leo Liu  <sdl.web@gmail.com>
+
+       * progmodes/xscheme.el (xscheme-expressions-ring)
+       (xscheme-expressions-ring-yank-pointer, xscheme-running-p)
+       (xscheme-control-g-disabled-p, xscheme-process-filter-state)
+       (xscheme-allow-output-p, xscheme-prompt)
+       (xscheme-string-accumulator, xscheme-mode-string): Use defvar-local.
+
+       * progmodes/scheme.el (would-be-symbol, next-sexp-as-string):
+       Comment out unused functions.
+
 2014-04-24  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * info.el: Use lexical-binding and cl-lib.
index da0b6edf3022c6068c0e60c490588cb9eecc160e..67374dd4c6c928f5afecf7849457f18fb508bb43 100644 (file)
@@ -1,4 +1,4 @@
-;;; scheme.el --- Scheme (and DSSSL) editing mode
+;;; scheme.el --- Scheme (and DSSSL) editing mode    -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 1986-1988, 1997-1998, 2001-2014 Free Software
 ;; Foundation, Inc.
@@ -495,20 +495,20 @@ indentation."
 \f
 ;;; Let is different in Scheme
 
-(defun would-be-symbol (string)
-  (not (string-equal (substring string 0 1) "(")))
+;; (defun scheme-would-be-symbol (string)
+;;   (not (string-equal (substring string 0 1) "(")))
 
-(defun next-sexp-as-string ()
-  ;; Assumes that it is protected by a save-excursion
-  (forward-sexp 1)
-  (let ((the-end (point)))
-    (backward-sexp 1)
-    (buffer-substring (point) the-end)))
+;; (defun scheme-next-sexp-as-string ()
+;;   ;; Assumes that it is protected by a save-excursion
+;;   (forward-sexp 1)
+;;   (let ((the-end (point)))
+;;     (backward-sexp 1)
+;;     (buffer-substring (point) the-end)))
 
 ;; This is correct but too slow.
 ;; The one below works almost always.
 ;;(defun scheme-let-indent (state indent-point)
-;;  (if (would-be-symbol (next-sexp-as-string))
+;;  (if (scheme-would-be-symbol (scheme-next-sexp-as-string))
 ;;      (scheme-indent-specform 2 state indent-point)
 ;;      (scheme-indent-specform 1 state indent-point)))
 
index e22581445e5596ec9362dd8eec4a28f309d2a732..4ab882b71fb254cd18dfadd3e9f8d366b5a43cdb 100644 (file)
@@ -1,4 +1,4 @@
-;;; xscheme.el --- run MIT Scheme under Emacs
+;;; xscheme.el --- run MIT Scheme under Emacs        -*- lexical-binding: t; -*-
 
 ;; Copyright (C) 1986-1987, 1989-1990, 2001-2014 Free Software
 ;; Foundation, Inc.
 (defvar xscheme-expressions-ring-max 30
   "Maximum length of Scheme expressions ring.")
 
-(defvar xscheme-expressions-ring nil
+(defvar-local xscheme-expressions-ring nil
   "List of expressions recently transmitted to the Scheme process.")
 
-(defvar xscheme-expressions-ring-yank-pointer nil
+(defvar-local xscheme-expressions-ring-yank-pointer nil
   "The tail of the Scheme expressions ring whose car is the last thing yanked.")
 
-(defvar xscheme-running-p nil
+(defvar-local xscheme-running-p nil
   "This variable, if nil, indicates that the scheme process is
 waiting for input.  Otherwise, it is busy evaluating something.")
 
@@ -64,7 +64,7 @@ waiting for input.  Otherwise, it is busy evaluating something.")
 control-g interrupts were signaled.  Do not allow more control-g's to be
 signaled until the scheme process acknowledges receipt.")
 
-(defvar xscheme-control-g-disabled-p nil
+(defvar-local xscheme-control-g-disabled-p nil
   "This variable, if non-nil, indicates that a control-g is being processed
 by the scheme process, so additional control-g's are to be ignored.")
 
@@ -78,37 +78,26 @@ by the scheme process, so additional control-g's are to be ignored.")
 (defvar xscheme-runlight "")
 (defvar xscheme-runlight-string nil)
 
-(defvar xscheme-process-filter-state 'idle
+(defvar-local xscheme-process-filter-state 'idle
   "State of scheme process escape reader state machine:
 idle                   waiting for an escape sequence
 reading-type           received an altmode but nothing else
 reading-string         reading prompt string")
 
-(defvar xscheme-allow-output-p t
+(defvar-local xscheme-allow-output-p t
   "This variable, if nil, prevents output from the scheme process
 from being inserted into the process-buffer.")
 
-(defvar xscheme-prompt ""
+(defvar-local xscheme-prompt ""
   "The current scheme prompt string.")
 
-(defvar xscheme-string-accumulator ""
+(defvar-local xscheme-string-accumulator ""
   "Accumulator for the string being received from the scheme process.")
 
-(defvar xscheme-mode-string nil)
-(setq-default scheme-mode-line-process
-             '("" xscheme-runlight))
-
-(mapc 'make-variable-buffer-local
-      '(xscheme-expressions-ring
-       xscheme-expressions-ring-yank-pointer
-       xscheme-process-filter-state
-       xscheme-running-p
-       xscheme-control-g-disabled-p
-       xscheme-allow-output-p
-       xscheme-prompt
-       xscheme-string-accumulator
-       xscheme-mode-string
-       scheme-mode-line-process))
+(defvar-local xscheme-mode-string nil)
+(setq-default scheme-mode-line-process '("" xscheme-runlight))
+(make-variable-buffer-local 'scheme-mode-line-process)
+
 \f
 (defgroup xscheme nil
   "Major mode for editing Scheme and interacting with MIT's C-Scheme."