diff options
| author | Leo Liu | 2014-04-24 23:34:26 +0800 |
|---|---|---|
| committer | Leo Liu | 2014-04-24 23:34:26 +0800 |
| commit | d5031a2aa1a37bb4a332bacec34eeda9e1836cc2 (patch) | |
| tree | d7b07d8fecd1c7f3e606f11b02766bf45f262f7f | |
| parent | 118b5a92cddc5eb9afb172376a765e57e001d901 (diff) | |
| download | emacs-d5031a2aa1a37bb4a332bacec34eeda9e1836cc2.tar.gz emacs-d5031a2aa1a37bb4a332bacec34eeda9e1836cc2.zip | |
* progmodes/scheme.el (would-be-symbol, next-sexp-as-string):
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.
| -rw-r--r-- | lisp/ChangeLog | 11 | ||||
| -rw-r--r-- | lisp/progmodes/scheme.el | 20 | ||||
| -rw-r--r-- | lisp/progmodes/xscheme.el | 37 |
3 files changed, 34 insertions, 34 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 831c6e659c9..6e5ad6ba29b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2014-04-24 Leo Liu <sdl.web@gmail.com> | ||
| 2 | |||
| 3 | * progmodes/xscheme.el (xscheme-expressions-ring) | ||
| 4 | (xscheme-expressions-ring-yank-pointer, xscheme-running-p) | ||
| 5 | (xscheme-control-g-disabled-p, xscheme-process-filter-state) | ||
| 6 | (xscheme-allow-output-p, xscheme-prompt) | ||
| 7 | (xscheme-string-accumulator, xscheme-mode-string): Use defvar-local. | ||
| 8 | |||
| 9 | * progmodes/scheme.el (would-be-symbol, next-sexp-as-string): | ||
| 10 | Comment out unused functions. | ||
| 11 | |||
| 1 | 2014-04-24 Stefan Monnier <monnier@iro.umontreal.ca> | 12 | 2014-04-24 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 13 | ||
| 3 | * info.el: Use lexical-binding and cl-lib. | 14 | * info.el: Use lexical-binding and cl-lib. |
diff --git a/lisp/progmodes/scheme.el b/lisp/progmodes/scheme.el index da0b6edf302..67374dd4c6c 100644 --- a/lisp/progmodes/scheme.el +++ b/lisp/progmodes/scheme.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; scheme.el --- Scheme (and DSSSL) editing mode | 1 | ;;; scheme.el --- Scheme (and DSSSL) editing mode -*- lexical-binding: t; -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1986-1988, 1997-1998, 2001-2014 Free Software | 3 | ;; Copyright (C) 1986-1988, 1997-1998, 2001-2014 Free Software |
| 4 | ;; Foundation, Inc. | 4 | ;; Foundation, Inc. |
| @@ -495,20 +495,20 @@ indentation." | |||
| 495 | 495 | ||
| 496 | ;;; Let is different in Scheme | 496 | ;;; Let is different in Scheme |
| 497 | 497 | ||
| 498 | (defun would-be-symbol (string) | 498 | ;; (defun scheme-would-be-symbol (string) |
| 499 | (not (string-equal (substring string 0 1) "("))) | 499 | ;; (not (string-equal (substring string 0 1) "("))) |
| 500 | 500 | ||
| 501 | (defun next-sexp-as-string () | 501 | ;; (defun scheme-next-sexp-as-string () |
| 502 | ;; Assumes that it is protected by a save-excursion | 502 | ;; ;; Assumes that it is protected by a save-excursion |
| 503 | (forward-sexp 1) | 503 | ;; (forward-sexp 1) |
| 504 | (let ((the-end (point))) | 504 | ;; (let ((the-end (point))) |
| 505 | (backward-sexp 1) | 505 | ;; (backward-sexp 1) |
| 506 | (buffer-substring (point) the-end))) | 506 | ;; (buffer-substring (point) the-end))) |
| 507 | 507 | ||
| 508 | ;; This is correct but too slow. | 508 | ;; This is correct but too slow. |
| 509 | ;; The one below works almost always. | 509 | ;; The one below works almost always. |
| 510 | ;;(defun scheme-let-indent (state indent-point) | 510 | ;;(defun scheme-let-indent (state indent-point) |
| 511 | ;; (if (would-be-symbol (next-sexp-as-string)) | 511 | ;; (if (scheme-would-be-symbol (scheme-next-sexp-as-string)) |
| 512 | ;; (scheme-indent-specform 2 state indent-point) | 512 | ;; (scheme-indent-specform 2 state indent-point) |
| 513 | ;; (scheme-indent-specform 1 state indent-point))) | 513 | ;; (scheme-indent-specform 1 state indent-point))) |
| 514 | 514 | ||
diff --git a/lisp/progmodes/xscheme.el b/lisp/progmodes/xscheme.el index e22581445e5..4ab882b71fb 100644 --- a/lisp/progmodes/xscheme.el +++ b/lisp/progmodes/xscheme.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; xscheme.el --- run MIT Scheme under Emacs | 1 | ;;; xscheme.el --- run MIT Scheme under Emacs -*- lexical-binding: t; -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1986-1987, 1989-1990, 2001-2014 Free Software | 3 | ;; Copyright (C) 1986-1987, 1989-1990, 2001-2014 Free Software |
| 4 | ;; Foundation, Inc. | 4 | ;; Foundation, Inc. |
| @@ -49,13 +49,13 @@ | |||
| 49 | (defvar xscheme-expressions-ring-max 30 | 49 | (defvar xscheme-expressions-ring-max 30 |
| 50 | "Maximum length of Scheme expressions ring.") | 50 | "Maximum length of Scheme expressions ring.") |
| 51 | 51 | ||
| 52 | (defvar xscheme-expressions-ring nil | 52 | (defvar-local xscheme-expressions-ring nil |
| 53 | "List of expressions recently transmitted to the Scheme process.") | 53 | "List of expressions recently transmitted to the Scheme process.") |
| 54 | 54 | ||
| 55 | (defvar xscheme-expressions-ring-yank-pointer nil | 55 | (defvar-local xscheme-expressions-ring-yank-pointer nil |
| 56 | "The tail of the Scheme expressions ring whose car is the last thing yanked.") | 56 | "The tail of the Scheme expressions ring whose car is the last thing yanked.") |
| 57 | 57 | ||
| 58 | (defvar xscheme-running-p nil | 58 | (defvar-local xscheme-running-p nil |
| 59 | "This variable, if nil, indicates that the scheme process is | 59 | "This variable, if nil, indicates that the scheme process is |
| 60 | waiting for input. Otherwise, it is busy evaluating something.") | 60 | waiting for input. Otherwise, it is busy evaluating something.") |
| 61 | 61 | ||
| @@ -64,7 +64,7 @@ waiting for input. Otherwise, it is busy evaluating something.") | |||
| 64 | control-g interrupts were signaled. Do not allow more control-g's to be | 64 | control-g interrupts were signaled. Do not allow more control-g's to be |
| 65 | signaled until the scheme process acknowledges receipt.") | 65 | signaled until the scheme process acknowledges receipt.") |
| 66 | 66 | ||
| 67 | (defvar xscheme-control-g-disabled-p nil | 67 | (defvar-local xscheme-control-g-disabled-p nil |
| 68 | "This variable, if non-nil, indicates that a control-g is being processed | 68 | "This variable, if non-nil, indicates that a control-g is being processed |
| 69 | by the scheme process, so additional control-g's are to be ignored.") | 69 | by the scheme process, so additional control-g's are to be ignored.") |
| 70 | 70 | ||
| @@ -78,37 +78,26 @@ by the scheme process, so additional control-g's are to be ignored.") | |||
| 78 | (defvar xscheme-runlight "") | 78 | (defvar xscheme-runlight "") |
| 79 | (defvar xscheme-runlight-string nil) | 79 | (defvar xscheme-runlight-string nil) |
| 80 | 80 | ||
| 81 | (defvar xscheme-process-filter-state 'idle | 81 | (defvar-local xscheme-process-filter-state 'idle |
| 82 | "State of scheme process escape reader state machine: | 82 | "State of scheme process escape reader state machine: |
| 83 | idle waiting for an escape sequence | 83 | idle waiting for an escape sequence |
| 84 | reading-type received an altmode but nothing else | 84 | reading-type received an altmode but nothing else |
| 85 | reading-string reading prompt string") | 85 | reading-string reading prompt string") |
| 86 | 86 | ||
| 87 | (defvar xscheme-allow-output-p t | 87 | (defvar-local xscheme-allow-output-p t |
| 88 | "This variable, if nil, prevents output from the scheme process | 88 | "This variable, if nil, prevents output from the scheme process |
| 89 | from being inserted into the process-buffer.") | 89 | from being inserted into the process-buffer.") |
| 90 | 90 | ||
| 91 | (defvar xscheme-prompt "" | 91 | (defvar-local xscheme-prompt "" |
| 92 | "The current scheme prompt string.") | 92 | "The current scheme prompt string.") |
| 93 | 93 | ||
| 94 | (defvar xscheme-string-accumulator "" | 94 | (defvar-local xscheme-string-accumulator "" |
| 95 | "Accumulator for the string being received from the scheme process.") | 95 | "Accumulator for the string being received from the scheme process.") |
| 96 | 96 | ||
| 97 | (defvar xscheme-mode-string nil) | 97 | (defvar-local xscheme-mode-string nil) |
| 98 | (setq-default scheme-mode-line-process | 98 | (setq-default scheme-mode-line-process '("" xscheme-runlight)) |
| 99 | '("" xscheme-runlight)) | 99 | (make-variable-buffer-local 'scheme-mode-line-process) |
| 100 | 100 | ||
| 101 | (mapc 'make-variable-buffer-local | ||
| 102 | '(xscheme-expressions-ring | ||
| 103 | xscheme-expressions-ring-yank-pointer | ||
| 104 | xscheme-process-filter-state | ||
| 105 | xscheme-running-p | ||
| 106 | xscheme-control-g-disabled-p | ||
| 107 | xscheme-allow-output-p | ||
| 108 | xscheme-prompt | ||
| 109 | xscheme-string-accumulator | ||
| 110 | xscheme-mode-string | ||
| 111 | scheme-mode-line-process)) | ||
| 112 | 101 | ||
| 113 | (defgroup xscheme nil | 102 | (defgroup xscheme nil |
| 114 | "Major mode for editing Scheme and interacting with MIT's C-Scheme." | 103 | "Major mode for editing Scheme and interacting with MIT's C-Scheme." |