(let ((replace-all nil) (nbr-replaced 0) (nbr-skipped 0) (done nil)
(el-search-keep-hl t) (opoint (point))
(get-replacement (el-search--matcher pattern replacement))
(let ((replace-all nil) (nbr-replaced 0) (nbr-skipped 0) (done nil)
(el-search-keep-hl t) (opoint (point))
(get-replacement (el-search--matcher pattern replacement))
(barf-if-buffer-read-only)
(let* ((from (el-search--read-pattern "Query replace pattern: "))
(to (let ((el-search--initial-mb-contents nil))
(barf-if-buffer-read-only)
(let* ((from (el-search--read-pattern "Query replace pattern: "))
(to (let ((el-search--initial-mb-contents nil))
As each match is found, the user must type a character saying
what to do with it. For directions, type ? at that time."
As each match is found, the user must type a character saying
what to do with it. For directions, type ? at that time."
(setq this-command 'el-search-query-replace) ;in case we come from isearch
(setq el-search-current-pattern from-pattern)
(barf-if-buffer-read-only)
(setq this-command 'el-search-query-replace) ;in case we come from isearch
(setq el-search-current-pattern from-pattern)
(barf-if-buffer-read-only)
(defun el-search--take-over-from-isearch (&optional goto-left-end)
(let ((other-end (and goto-left-end isearch-other-end))
(defun el-search--take-over-from-isearch (&optional goto-left-end)
(let ((other-end (and goto-left-end isearch-other-end))