From xemacs-m  Sat Feb 22 17:22:33 1997
Received: from crystal.WonderWorks.COM (crystal.WonderWorks.com [192.203.206.1])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id RAA07957
	for <xemacs-beta@xemacs.org>; Sat, 22 Feb 1997 17:22:31 -0600 (CST)
Received: by crystal.WonderWorks.COM 
	id QQcebd17700; Sat, 22 Feb 1997 18:22:32 -0500 (EST)
Date: Sat, 22 Feb 1997 18:22:32 -0500 (EST)
Message-Id: <QQcebd17700.199702222322@crystal.WonderWorks.COM>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
From: Kyle Jones <kyle_jones@wonderworks.com>
To: xemacs-beta@xemacs.org
Subject: [PATCH] 20.0b1: highlighting wrong after , during query-replace

Try doing a query-replace and using the , key to replace a string
and not move point.  Notice that the highlighting is wrong now.
Here's a patch that leaves the highlighting off just after a ,
command to avoid the problem.  You will have to redump your Emacs
for this to take effect.

(Never have I been more happy that XEmacs doesn't create a
differently named binary and DOC file for every dump than I am
today.)

*** 1.1	1997/02/22 23:10:42
--- lisp/prim/replace.el	1997/02/22 23:12:25
***************
*** 581,587 ****
        (let ((aborted t))
  	(unwind-protect
  	    (progn
! 	      (isearch-highlight (match-beginning 0) (match-end 0))
  	      (next-command-event event)
  	      (setq aborted nil))
  	  (isearch-dehighlight aborted)))
--- 581,588 ----
        (let ((aborted t))
  	(unwind-protect
  	    (progn
! 	      (if (match-beginning 0)
! 		  (isearch-highlight (match-beginning 0) (match-end 0)))
  	      (next-command-event event)
  	      (setq aborted nil))
  	  (isearch-dehighlight aborted)))
***************
*** 735,740 ****
--- 736,742 ----
  		       (if (not replaced)
  			   (progn
  			     (replace-match next-replacement nocasify literal)
+ 			     (store-match-data nil)
  			     (setq replaced t))))
  		      ((eq def 'automatic)
  		       (or replaced

