query-replace backward
authorJuri Linkov <juri@jurta.org>
Thu, 19 Dec 2013 00:29:41 +0000 (02:29 +0200)
committerJuri Linkov <juri@jurta.org>
Thu, 19 Dec 2013 00:29:41 +0000 (02:29 +0200)
commit3ee4cd6482abbabb06630a6c725277d42061eee7
tree37de7f94d5bf0f7b7cab7335c814ae5f50f0d2ac
parent0cda6b7b136178f42510c9e4ededcbaa38c4cc19
query-replace backward

* lisp/replace.el (query-replace-read-args): Split a non-negative arg
and a negative arg into separate elements.
(query-replace, query-replace-regexp, replace-string)
(replace-regexp): Add arg `backward'.  Doc fix.
(replace-match-maybe-edit): When new arg `backward' is non-nil,
move point to the beginning of the match.
(replace-search, replace-highlight): Use new arg `backward'
to set the value of `isearch-forward'.
(perform-replace): Add arg `backward' and use it to perform
replacement backward.

* lisp/isearch.el (isearch-query-replace): Use a negative prefix arg
to call `perform-replace' with a non-nil arg `backward'.

Fixes: debbugs:14979
etc/NEWS
lisp/ChangeLog
lisp/isearch.el
lisp/replace.el