comparison lisp/replace.el @ 109715:843bffdd92eb

Fix query-replace-regexp incomplete highlighting (Bug#6808). * replace.el (replace-highlight): Bind isearch-forward and isearch-error, ensuring that highlighting is updated if the user switches the search direction (Bug#6808). * isearch.el (isearch-lazy-highlight-forward): New var. (isearch-lazy-highlight-new-loop, isearch-lazy-highlight-search): (isearch-lazy-highlight-update): Use it.
author Chong Yidong <cyd@stupidchicken.com>
date Sun, 08 Aug 2010 16:55:52 -0400
parents 1d1d5d9bd884
children df8e0cd18128 376148b31b5e
comparison
equal deleted inserted replaced
109714:091f3ff9a59e 109715:843bffdd92eb
1891 (overlay-put replace-overlay 'face 'query-replace))) 1891 (overlay-put replace-overlay 'face 'query-replace)))
1892 (if query-replace-lazy-highlight 1892 (if query-replace-lazy-highlight
1893 (let ((isearch-string string) 1893 (let ((isearch-string string)
1894 (isearch-regexp regexp) 1894 (isearch-regexp regexp)
1895 (search-whitespace-regexp nil) 1895 (search-whitespace-regexp nil)
1896 (isearch-case-fold-search case-fold)) 1896 (isearch-case-fold-search case-fold)
1897 (isearch-forward t)
1898 (isearch-error nil))
1897 (isearch-lazy-highlight-new-loop range-beg range-end)))) 1899 (isearch-lazy-highlight-new-loop range-beg range-end))))
1898 1900
1899 (defun replace-dehighlight () 1901 (defun replace-dehighlight ()
1900 (when replace-overlay 1902 (when replace-overlay
1901 (delete-overlay replace-overlay)) 1903 (delete-overlay replace-overlay))