--- Eli Zaretskii <[EMAIL PROTECTED]> wrote:
> > Date: Wed, 9 Feb 2005 08:54:59 -0800 (PST)
> > From: Michael Mauger <[EMAIL PROTECTED]>
> >
> > I am in W32 but it doesn't appear to be system dependent. I did some
> > more research and determined that the problem is not specific to
> > `query-replace-regexp', it also occurs in `query-replace'; and it is
> > not related to whitespace handling.
> >
> > The problem appears in the handling of history when the default is
> > processed.
> >
> > ...
> >
> > The following patch seems to correct the problem:
>
> Thanks, I installed this.
>
I found a problem in the patch I had provided. The following corrects
the problem (essentially the order was backwards so the wrong value was
being returned):
Index: emacs/lisp/replace.el
===================================================================
RCS file: /c/cvsroot/emacs/emacs/lisp/replace.el,v
retrieving revision 1.206
diff -u -r1.206 replace.el
--- emacs/lisp/replace.el 19 Feb 2005 21:08:43 -0000 1.206
+++ emacs/lisp/replace.el 3 Mar 2005 00:55:03 -0000
@@ -116,10 +116,10 @@
nil t t))))
(if (and (zerop (length from)) lastto lastfrom)
(progn
- (cons lastfrom
- (query-replace-compile-replacement lastto regexp-flag))
(set query-replace-from-history-variable
- (cdr (symbol-value
query-replace-from-history-variable))))
+ (cdr (symbol-value
query-replace-from-history-variable)))
+ (cons lastfrom
+ (query-replace-compile-replacement lastto
regexp-flag)))
;; Warn if user types \n or \t, but don't reject the input.
(and regexp-flag
(string-match
"\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\(\\\\[nt]\\)" from)
Thanks.
_______________________________________________
Emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug