emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: suggestion in query-replace is messed up after cancelation


From: Chong Yidong
Subject: Re: suggestion in query-replace is messed up after cancelation
Date: Sun, 28 May 2006 10:06:32 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>> + (defvar query-replace-defaults nil
>> +   "Default values of FROM-STRING and TO-STRING for `query-replace'.
>> + This is a cons cell (FROM-STRING . TO-STRING), or nil if there is
>> + no default value.")
>
> What about having a list of cons cells (FROM-STRING . TO-STRING)
> of all previous replacements and using new keys (e.g. M-P and M-N)
> to access previous/next replacements pairs from the replacement pair
> history?

That is not so straightforward to implement since we can't use a list
of cons cells as a history list for read-from-minibuffer.

>> !       (if (and (zerop (length from)) query-replace-defaults)
>>        (progn
>>          (set query-replace-from-history-variable
>>               (cdr (symbol-value query-replace-from-history-variable)))
>
> We don't need this `set' anymore.

We do, at least in this patch, since read-from-minibuffer
automatically updates the history list (which is still given by
query-replace-from-history-variable).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]