From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Matthias Habl Newsgroups: gmane.emacs.bugs Subject: Markers aren't updated with 'replace-match' Date: Wed, 25 Sep 2002 20:53:11 +0200 (CEST) Sender: bug-gnu-emacs-admin@gnu.org Message-ID: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: main.gmane.org 1032980085 16675 127.0.0.1 (25 Sep 2002 18:54:45 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 25 Sep 2002 18:54:45 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17uHJ6-0004Ko-00 for ; Wed, 25 Sep 2002 20:54:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17uHJE-0004tf-00; Wed, 25 Sep 2002 14:54:52 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17uHHh-0004Cv-00 for bug-gnu-emacs@gnu.org; Wed, 25 Sep 2002 14:53:17 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17uHHe-0004BS-00 for bug-gnu-emacs@gnu.org; Wed, 25 Sep 2002 14:53:16 -0400 Original-Received: from rrzs2.rz.uni-regensburg.de ([132.199.1.2]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17uHHe-0004BO-00 for bug-gnu-emacs@gnu.org; Wed, 25 Sep 2002 14:53:14 -0400 Original-Received: from pc8383.physik.uni-regensburg.de (pc8383.physik.uni-regensburg.de [132.199.98.175]) by rrzs2.rz.uni-regensburg.de (8.11.6+Sun/8.11.6) with ESMTP id g8PIrD329410 for ; Wed, 25 Sep 2002 20:53:13 +0200 (MEST) Original-Received: from ham03789 (helo=localhost) by pc8383.physik.uni-regensburg.de with local-esmtp (Exim 3.35 #1 (Debian)) id 17uHHc-0004mZ-00 for ; Wed, 25 Sep 2002 20:53:12 +0200 X-X-Sender: ham03789@pc8383.physik.uni-regensburg.de Original-To: bug-gnu-emacs@gnu.org Errors-To: bug-gnu-emacs-admin@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.bugs:3572 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:3572 In GNU Emacs 21.1.3 (i586-pc-linux-gnu, X toolkit) of 2002-01-13 on mhilin When replacing two matched substrings in series the markers of the match data (available with (match-data)) aren't updated. In the following example I want to replace "A" and "B" with "11" and "22" respectively. (defun test-replace-match () (interactive) (when (re-search-forward "\\(A\\) and \\(B\\)") (replace-match "11" nil nil nil 1) (replace-match "22" nil nil nil 2))) But when doing M-x test-replace-match at the beginning of the next line Test string: A and B the result is Test string: 11 and22B instead of 'Test string: 11 and 22'. Why does the match data consist of markers although these aren't updated when using the function 'replace-match', which is used most commonly after doing a RE search? Matthias Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: C locale-coding-system: nil default-enable-multibyte-characters: t