1435 |
query-replace-skip-read-only)) |
query-replace-skip-read-only)) |
1436 |
(unless (or literal noedit) |
(unless (or literal noedit) |
1437 |
(replace-highlight (nth 0 real-match-data) |
(replace-highlight (nth 0 real-match-data) |
1438 |
(nth 1 real-match-data))) |
(nth 1 real-match-data) |
1439 |
|
start end)) |
1440 |
(setq noedit |
(setq noedit |
1441 |
(replace-match-maybe-edit |
(replace-match-maybe-edit |
1442 |
next-replacement nocasify literal |
next-replacement nocasify literal |
1452 |
;; `real-match-data'. |
;; `real-match-data'. |
1453 |
(while (not done) |
(while (not done) |
1454 |
(set-match-data real-match-data) |
(set-match-data real-match-data) |
1455 |
(replace-highlight (match-beginning 0) (match-end 0)) |
(replace-highlight (match-beginning 0) (match-end 0) |
1456 |
|
start end) |
1457 |
;; Bind message-log-max so we don't fill up the message log |
;; Bind message-log-max so we don't fill up the message log |
1458 |
;; with a bunch of identical messages. |
;; with a bunch of identical messages. |
1459 |
(let ((message-log-max nil)) |
(let ((message-log-max nil)) |
1629 |
|
|
1630 |
(defvar replace-overlay nil) |
(defvar replace-overlay nil) |
1631 |
|
|
1632 |
(defun replace-highlight (beg end) |
(defun replace-highlight (match-beg match-end range-beg range-end) |
1633 |
(if query-replace-highlight |
(if query-replace-highlight |
1634 |
(if replace-overlay |
(if replace-overlay |
1635 |
(move-overlay replace-overlay beg end (current-buffer)) |
(move-overlay replace-overlay match-beg match-end (current-buffer)) |
1636 |
(setq replace-overlay (make-overlay beg end)) |
(setq replace-overlay (make-overlay match-beg match-end)) |
1637 |
(overlay-put replace-overlay 'priority 1) ;higher than lazy overlays |
(overlay-put replace-overlay 'priority 1) ;higher than lazy overlays |
1638 |
(overlay-put replace-overlay 'face 'query-replace))) |
(overlay-put replace-overlay 'face 'query-replace))) |
1639 |
(if query-replace-lazy-highlight |
(when query-replace-lazy-highlight |
1640 |
(isearch-lazy-highlight-new-loop))) |
(isearch-lazy-highlight-new-loop range-beg range-end))) |
1641 |
|
|
1642 |
(defun replace-dehighlight () |
(defun replace-dehighlight () |
1643 |
(when replace-overlay |
(when replace-overlay |