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.
#| -*-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
(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))))