From: Chris Hanson Date: Fri, 13 Mar 1992 10:05:26 +0000 (+0000) Subject: COMINT-LINE-START was matching COMINT-PROMPT-REGEXP against the X-Git-Tag: 20090517-FFI~9607 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=050cf9134da810244679f431f02f569693b4758c;p=mit-scheme.git COMINT-LINE-START was matching COMINT-PROMPT-REGEXP against the remainder of the buffer when it is only necessary to match against the remainder of the line. This occasionally caused the primitive re-match-buffer to signal an anonymous error. This patch will make the anonymous error extremely unlikely. The anonymous error indicates a stack-overflow condition that is difficult to fix properly. However, the primitive can be modified to use heuristics that will eliminate the error; the cost is that cases that would have signalled the error will instead return a non-maximal match or a non-match in cases where it would have returned a maximal match had the stack been deep enough. --- diff --git a/v7/src/edwin/comint.scm b/v7/src/edwin/comint.scm index fae0fc069..55723fe8c 100644 --- a/v7/src/edwin/comint.scm +++ b/v7/src/edwin/comint.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/comint.scm,v 1.12 1992/01/23 20:59:31 cph Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/comint.scm,v 1.13 1992/03/13 10:05:26 cph Exp $ Copyright (c) 1991-92 Massachusetts Institute of Technology @@ -375,7 +375,7 @@ comint-prompt-regexp." (let ((mark (re-match-forward (ref-variable comint-prompt-regexp) start - (group-end mark)))) + (line-end mark 0)))) (if (and mark (mark<= mark (line-end start 0))) mark start))))