From 78963eff3165a65b2a0df834f50597dc911365e6 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 8 Mar 1994 20:17:39 +0000 Subject: [PATCH] Declare COMINT-INPUT-RING and COMINT-LAST-INPUT-MATCH to be permanent-local. --- v7/src/edwin/comhst.scm | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/v7/src/edwin/comhst.scm b/v7/src/edwin/comhst.scm index 2eba69834..bc24c8304 100644 --- a/v7/src/edwin/comhst.scm +++ b/v7/src/edwin/comhst.scm @@ -1,8 +1,8 @@ #| -*-Scheme-*- -$Id: comhst.scm,v 1.2 1993/08/22 04:16:32 gjr Exp $ +$Id: comhst.scm,v 1.3 1994/03/08 20:17:39 cph Exp $ -Copyright (c) 1992-1993 Massachusetts Institute of Technology +Copyright (c) 1992-94 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -46,10 +46,18 @@ license should have been included along with this file. |# "Size of input history ring." 30) -(define-variable comint-input-ring "" false) +(define-variable comint-input-ring "" #f) +(variable-permanent-local! (ref-variable-object comint-input-ring)) -(define comint-input-ring-tag - '(COMINT-INPUT-RING)) +(define-variable comint-last-input-match "" #f) +(variable-permanent-local! (ref-variable-object comint-last-input-match)) + +(define comint-input-ring-tag '(COMINT-INPUT-RING)) + +(define (comint-record-input ring string) + (if (or (ring-empty? ring) + (not (string=? string (ring-ref ring 0)))) + (ring-push! ring string))) (define-command comint-previous-input "Cycle backwards through input history." @@ -80,9 +88,7 @@ license should have been included along with this file. |# "*p" (lambda (argument) ((ref-command comint-previous-input) (- argument)))) - -(define-variable comint-last-input-match "" false) - + (define-command comint-history-search-backward "Search backwards through the input history for a matching substring." (lambda () @@ -120,9 +126,4 @@ license should have been included along with this file. |# (set-variable! comint-last-input-match string) ((ref-command comint-previous-input) (- index start))) (else - (loop index))))))))) - -(define (comint-record-input ring string) - (if (or (ring-empty? ring) - (not (string=? string (ring-ref ring 0)))) - (ring-push! ring string))) \ No newline at end of file + (loop index))))))))) \ No newline at end of file -- 2.25.1