From: "Mattias Engdegård" <mattiase@acm.org>
To: martin rudalics <rudalics@gmx.at>, emacs-devel <emacs-devel@gnu.org>
Subject: Re: Invoking gdb hangs after tweak in comint.el
Date: Tue, 12 Mar 2019 13:07:40 +0100 [thread overview]
Message-ID: <48c720eddbcc3f378465cdd47813a2ff49da2004.camel@acm.org> (raw)
In-Reply-To: <5C878139.4050903@gmx.at>
tis 2019-03-12 klockan 10:51 +0100 skrev martin rudalics:
> - (while (string-match (concat "\\(^" comint-prompt-regexp
> + (while (string-match (concat "\\(" comint-prompt-regexp
> "\\)\\1+")
> string)
> (setq string (replace-match "\\1" nil nil string)))
And this shows just how good my review of that change was. Sorry!
That code never worked in the first place; only Paul Eggert's fix
exposed its brokenness for us all to see. (comint-prompt-regexp is "^",
making the loop infinite.)
A comint expert needs to look at it, but since the loop never worked,
perhaps it could be removed entirely? Either that, or add a condition:
- (while (string-match (concat "\\(^" comint-prompt-regexp
- "\\)\\1+")
- string)
+ (while (and (string-match (concat "\\(" comint-prompt-
regexp
+ "\\)\\1+")
+ string)
+ (> (match-end 1) (match-beginning 1)))
next prev parent reply other threads:[~2019-03-12 12:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-12 9:51 Invoking gdb hangs after tweak in comint.el martin rudalics
2019-03-12 12:07 ` Mattias Engdegård [this message]
2019-03-19 0:47 ` Paul Eggert
2019-04-23 9:21 ` martin rudalics
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48c720eddbcc3f378465cdd47813a2ff49da2004.camel@acm.org \
--to=mattiase@acm.org \
--cc=emacs-devel@gnu.org \
--cc=rudalics@gmx.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.