diff options
| author | Glenn Morris | 2019-09-15 16:38:23 -0700 |
|---|---|---|
| committer | Glenn Morris | 2019-09-15 16:38:23 -0700 |
| commit | a625ca5c2675a41c5c0d277def6b8cb4f4c4d6db (patch) | |
| tree | 80a22e6d963bd93ba62c6df48e26aec7eecbbfa4 /lisp/replace.el | |
| parent | 211dc01a7bfac81281fa80e45e21157fc0c25b26 (diff) | |
| parent | 30c4f35a6fc8a6507930923766c3126ac1c2063f (diff) | |
| download | emacs-a625ca5c2675a41c5c0d277def6b8cb4f4c4d6db.tar.gz emacs-a625ca5c2675a41c5c0d277def6b8cb4f4c4d6db.zip | |
Merge from origin/emacs-26
30c4f35 (origin/emacs-26) query-replace-regexp undo: Update next-repl...
c596be0 Amend the menu caption for page "Display Property" in the Eli...
13b9510 Add description of chinese-sisheng
Diffstat (limited to 'lisp/replace.el')
| -rw-r--r-- | lisp/replace.el | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lisp/replace.el b/lisp/replace.el index ad9be77a79b..a82780fc47e 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -2698,7 +2698,7 @@ characters." | |||
| 2698 | (num-replacements 0) | 2698 | (num-replacements 0) |
| 2699 | (nocasify t) ; Undo must preserve case (Bug#31073). | 2699 | (nocasify t) ; Undo must preserve case (Bug#31073). |
| 2700 | search-string | 2700 | search-string |
| 2701 | next-replacement) | 2701 | last-replacement) |
| 2702 | (while (and (< stack-idx stack-len) | 2702 | (while (and (< stack-idx stack-len) |
| 2703 | stack | 2703 | stack |
| 2704 | (or (null replaced) last-was-act-and-show)) | 2704 | (or (null replaced) last-was-act-and-show)) |
| @@ -2709,9 +2709,9 @@ characters." | |||
| 2709 | ;; Bind swapped values | 2709 | ;; Bind swapped values |
| 2710 | ;; (search-string <--> replacement) | 2710 | ;; (search-string <--> replacement) |
| 2711 | search-string (nth (if replaced 4 3) elt) | 2711 | search-string (nth (if replaced 4 3) elt) |
| 2712 | next-replacement (nth (if replaced 3 4) elt) | 2712 | last-replacement (nth (if replaced 3 4) elt) |
| 2713 | search-string-replaced search-string | 2713 | search-string-replaced search-string |
| 2714 | next-replacement-replaced next-replacement | 2714 | last-replacement-replaced last-replacement |
| 2715 | last-was-act-and-show nil) | 2715 | last-was-act-and-show nil) |
| 2716 | 2716 | ||
| 2717 | (when (and (= stack-idx stack-len) | 2717 | (when (and (= stack-idx stack-len) |
| @@ -2733,16 +2733,18 @@ characters." | |||
| 2733 | (match-data t (nth 2 elt))) | 2733 | (match-data t (nth 2 elt))) |
| 2734 | noedit | 2734 | noedit |
| 2735 | (replace-match-maybe-edit | 2735 | (replace-match-maybe-edit |
| 2736 | next-replacement nocasify literal | 2736 | last-replacement nocasify literal |
| 2737 | noedit real-match-data backward) | 2737 | noedit real-match-data backward) |
| 2738 | replace-count (1- replace-count) | 2738 | replace-count (1- replace-count) |
| 2739 | real-match-data | 2739 | real-match-data |
| 2740 | (save-excursion | 2740 | (save-excursion |
| 2741 | (goto-char (match-beginning 0)) | 2741 | (goto-char (match-beginning 0)) |
| 2742 | (if regexp-flag | 2742 | (if regexp-flag |
| 2743 | (looking-at next-replacement) | 2743 | (looking-at last-replacement) |
| 2744 | (looking-at (regexp-quote next-replacement))) | 2744 | (looking-at (regexp-quote last-replacement))) |
| 2745 | (match-data t (nth 2 elt)))) | 2745 | (match-data t (nth 2 elt)))) |
| 2746 | (when regexp-flag | ||
| 2747 | (setq next-replacement (nth 4 elt))) | ||
| 2746 | ;; Set replaced nil to keep in loop | 2748 | ;; Set replaced nil to keep in loop |
| 2747 | (when (eq def 'undo-all) | 2749 | (when (eq def 'undo-all) |
| 2748 | (setq replaced nil | 2750 | (setq replaced nil |