From: Reiner Steib <reinersteib+gmane@imap.cc>
Subject: gnus-replace-in-string: Avoid inf-loop in XEmacs (was: New completion mode)
Date: Thu, 20 Apr 2006 15:07:24 +0200 [thread overview]
Message-ID: <v9bquwe6pf.fsf_-_@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: <microsoft-free.87slo88mwj.fsf@youngs.au.com>
On Mon, Apr 17 2006, Steve Youngs wrote:
[ from <news:microsoft-free.87y7y5uk1k.fsf@youngs.au.com> ]
> * Reiner Steib <reinersteib+gmane@imap.cc> writes:
[...]
> > - In `message-put-addresses-in-ecomplete' you should use
> > `gnus-replace-in-string' instead of `replace-regexp-in-string' for
> > compatibility with XEmacs.
>
> Only needed for XEmacs 21.4. XEmacs 21.5 and SXEmacs has
> `replace-regexp-in-string'.
Is it just a wrapper around `replace-in-string' or is it Emacs
implementation of `replace-regexp-in-string'? Hm...
,----
| ELISP> emacs-version
| "21.5 (beta21) \"corn\" (+CVS-20050720) XEmacs Lucid"
| ELISP> (replace-regexp-in-string "/*$" "/" "foo")
| "foo/"
| ELISP> (replace-in-string "foo" "/*$" "/")
| *** Eval error *** Quit during evaluation (inf-loop -> C-g)
`----
We should change `gnus-replace-in-string' as follows, I think:
--8<---------------cut here---------------start------------->8---
--- gnus-util.el 20 Apr 2006 12:10:00 +0200 6.104.2.24
+++ gnus-util.el 20 Apr 2006 14:52:55 +0200
@@ -61,8 +61,6 @@
(eval-and-compile
(cond
- ((fboundp 'replace-in-string)
- (defalias 'gnus-replace-in-string 'replace-in-string))
((fboundp 'replace-regexp-in-string)
(defun gnus-replace-in-string (string regexp newtext &optional literal)
"Replace all matches for REGEXP with NEWTEXT in STRING.
@@ -71,6 +69,8 @@
This is a compatibility function for different Emacsen."
(replace-regexp-in-string regexp newtext string nil literal)))
+ ((fboundp 'replace-in-string)
+ (defalias 'gnus-replace-in-string 'replace-in-string))
(t
(defun gnus-replace-in-string (string regexp newtext &optional literal)
"Replace all matches for REGEXP with NEWTEXT in STRING.
--8<---------------cut here---------------end--------------->8---
On Thu, Apr 20 2006, Steve Youngs wrote:
> * Katsumi Yamaoka <yamaoka@jpl.org> writes:
[...]
> > The regexp used in `message-put-addresses-in-ecomplete' causes
> > an infloop in XEmacs. The test case is:
>
> > (gnus-replace-in-string "yamaoka@jpl.org" "^ +\\| *$" "")
>
> > It might be due to an XEmacs bug.
It's a bug in XEmacs, see
<http://thread.gmane.org/gmane.emacs.xemacs.beta/16592/focus=16603>.
> > Though it seems to be solved by replacing the regexp with "^
> > +\\| +$".
>
> This fixed the problem I was seeing in SXEmacs too.
Does shifting down "((fboundp 'replace-in-string) ...)" solve this
problem too?
Bye, Reiner.
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
next prev parent reply other threads:[~2006-04-20 13:07 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-11 10:30 New completion mode Lars Magne Ingebrigtsen
2006-04-11 15:40 ` Sam Steingold
2006-04-11 15:52 ` Lars Magne Ingebrigtsen
2006-04-11 16:02 ` Sam Steingold
2006-04-12 6:21 ` Lars Magne Ingebrigtsen
2006-04-12 7:55 ` Lars Magne Ingebrigtsen
2006-04-12 11:13 ` Reiner Steib
2006-04-12 11:35 ` Lars Magne Ingebrigtsen
2006-04-12 13:25 ` Lars Magne Ingebrigtsen
2006-04-12 14:41 ` Lars Magne Ingebrigtsen
2006-04-13 2:29 ` Wolfram Fenske
2006-04-13 5:42 ` Lars Magne Ingebrigtsen
2006-04-13 16:19 ` Wolfram Fenske
[not found] ` <m3bqv6av4t.fsf-qBEgNjfYAPolG3ThADb//ti2O/JbrIOy@public.gmane.org>
2006-04-13 17:31 ` Jochen Küpper
2006-04-14 10:27 ` Lars Magne Ingebrigtsen
2006-04-16 19:50 ` Use of ecomplete.el in message.el (was: New completion mode) Reiner Steib
2006-04-16 20:30 ` Use of ecomplete.el in message.el Lars Magne Ingebrigtsen
2006-04-17 11:40 ` Reiner Steib
2006-04-17 13:04 ` Lars Magne Ingebrigtsen
2006-04-17 0:23 ` Steve Youngs
2006-04-17 9:01 ` Lars Magne Ingebrigtsen
2006-04-18 11:17 ` New completion mode Simon Josefsson
2006-04-18 13:04 ` Reiner Steib
2006-04-18 13:46 ` Simon Josefsson
2006-04-18 15:24 ` Lars Magne Ingebrigtsen
2006-04-18 21:07 ` Simon Josefsson
2006-04-21 23:51 ` Lars Magne Ingebrigtsen
2006-04-14 19:26 ` Miles Bader
2006-04-15 5:46 ` Lars Magne Ingebrigtsen
2006-04-18 22:22 ` Wolfram Fenske
2006-04-19 7:26 ` Katsumi Yamaoka
2006-04-20 12:14 ` Steve Youngs
2006-04-20 13:07 ` Reiner Steib [this message]
2006-04-20 14:18 ` gnus-replace-in-string: Avoid inf-loop in XEmacs Michael Olson
2006-04-20 15:23 ` Reiner Steib
2006-04-22 4:36 ` Michael Olson
2006-04-20 16:06 ` Steve Youngs
2006-04-20 17:06 ` Reiner Steib
2006-04-21 6:32 ` New completion mode Steve Youngs
2006-04-22 0:01 ` Lars Magne Ingebrigtsen
2006-04-24 8:55 ` Katsumi Yamaoka
2006-04-30 9:32 ` Lars Magne Ingebrigtsen
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=v9bquwe6pf.fsf_-_@marauder.physik.uni-ulm.de \
--to=reinersteib+gmane@imap.cc \
--cc=Reiner.Steib@gmx.de \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).