|
From: | Paul Eggert |
Subject: | Re: Scan of regexps in emacs |
Date: | Sun, 10 Mar 2019 20:37:19 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 |
Clément Pit-Claudel wrote:
On 10/03/2019 22.45, Paul Eggert wrote:- (while (string-match (concat "\\(^" comint-prompt-regexp + (while (string-match (concat "\\(" comint-prompt-regexp "\\)\\1+") string)I think your change altered the meaning of that regexp.
Yes and no. Yes, it altered the meaning of the regexp, but no it should fix a bug rather than introduce one because comint-prompt-regexp in practice always seems to be anchored to a line start. For example, comint-prompt-regexp defaults to "^", which meant that the above code's entire regexp was this:
\(^^\)\1+ which is equivalent to this regexp: \(^\^\)\1+ which is not what was wanted.
[Prev in Thread] | Current Thread | [Next in Thread] |