From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Geoff Odhner Newsgroups: gmane.emacs.bugs Subject: Re: regex bug with pattern "\\*/" matching end of buffer */ Date: Mon, 2 May 2005 08:54:53 -0400 Message-ID: References: <20050430231850.495369F50E@mirror.positive-internet.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Trace: sea.gmane.org 1115055719 30596 80.91.229.2 (2 May 2005 17:41:59 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 2 May 2005 17:41:59 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org, Geoff Odhner Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 02 19:41:56 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DSetn-0005n3-S9 for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 May 2005 19:40:04 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DSeq1-0000oR-Pc for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 May 2005 13:36:09 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DSeFi-0006bW-CG for bug-gnu-emacs@gnu.org; Mon, 02 May 2005 12:58:41 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DSeFb-0006WX-0G for bug-gnu-emacs@gnu.org; Mon, 02 May 2005 12:58:31 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DSeFa-0006S9-0b for bug-gnu-emacs@gnu.org; Mon, 02 May 2005 12:58:30 -0400 Original-Received: from [199.232.41.67] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_ARCFOUR_SHA:16) (Exim 4.34) id 1DSeIp-0006A8-VX; Mon, 02 May 2005 13:01:52 -0400 Original-Received: from [63.88.59.92] (helo=fepnjnotes3.franklin.com) by mx20.gnu.org with esmtp (Exim 4.34) id 1DSaU4-0007vZ-KQ; Mon, 02 May 2005 08:57:15 -0400 In-Reply-To: <20050430231850.495369F50E@mirror.positive-internet.com> Original-To: rms@gnu.org X-Mailer: Lotus Notes Release 6.5.1 January 21, 2004 X-MIMETrack: Serialize by Router on fepnjnotes3/fep(Release 6.5.3|September 14, 2004) at 05/02/2005 08:55:41 AM, Serialize complete at 05/02/2005 08:55:41 AM X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:11273 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:11273 Thank you. I am relieved to find the bug is in my code. Indeed, it works correctly when I recode it thus: (while (and (re-search-forward "\\*/" nil t) (replace-match "*-/" nil nil)) (not (eobp)))) Geoff Odhner Richard Stallman wrote on 04/30/2005 07:18:50 PM: > (while (and (re-search-forward "\\*/" nil t) (not (eobp))) > (replace-match "*-/" nil nil))) > > it will give me the following line as the result: > > char ch; /-* sample comment */ > > That's because (eobp) returns t when you're at the end of the > accessible portion of the buffer. So the bug is in your code, > I think. >