mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
* 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.
This commit is contained in:
parent
118b5a92cd
commit
d5031a2aa1
3 changed files with 33 additions and 33 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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."
|
|||
|
||||
;;; 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)))
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
@ -49,13 +49,13 @@
|
|||
(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))
|
||||
(defvar-local xscheme-mode-string nil)
|
||||
(setq-default scheme-mode-line-process '("" xscheme-runlight))
|
||||
(make-variable-buffer-local 'scheme-mode-line-process)
|
||||
|
||||
(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))
|
||||
|
||||
(defgroup xscheme nil
|
||||
"Major mode for editing Scheme and interacting with MIT's C-Scheme."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue