diff options
| author | Stefan Kangas | 2022-01-31 06:58:23 +0100 |
|---|---|---|
| committer | Stefan Kangas | 2022-01-31 06:58:23 +0100 |
| commit | 3652170d7dd3a0aa3cf59d7ccffbf13d6fa0118e (patch) | |
| tree | 217a377ad6306bf6bc2fade065b80d519fb2c9ac /lisp/replace.el | |
| parent | cb91643c976540fc8c9d46e12a8edcb73be53467 (diff) | |
| parent | 6f282b31ad7548ab744565144e0d30dd56774210 (diff) | |
| download | emacs-3652170d7dd3a0aa3cf59d7ccffbf13d6fa0118e.tar.gz emacs-3652170d7dd3a0aa3cf59d7ccffbf13d6fa0118e.zip | |
Merge from origin/emacs-28
6f282b31ad Update to Org 9.5.2-13-gdd6486
6636231b2c ; * lisp/international/latin1-disp.el: Update commentary.
f22e9ba9ac Fix regression in Occur Edit mode
Diffstat (limited to 'lisp/replace.el')
| -rw-r--r-- | lisp/replace.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/replace.el b/lisp/replace.el index dd6e5a42258..689a3f77ed3 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -1413,10 +1413,15 @@ To return to ordinary Occur mode, use \\[occur-cease-edit]." | |||
| 1413 | (length s1))))) | 1413 | (length s1))))) |
| 1414 | (prefix-len (funcall common-prefix buf-str text)) | 1414 | (prefix-len (funcall common-prefix buf-str text)) |
| 1415 | (suffix-len (funcall common-prefix | 1415 | (suffix-len (funcall common-prefix |
| 1416 | (reverse buf-str) (reverse text)))) | 1416 | (reverse (substring |
| 1417 | buf-str prefix-len)) | ||
| 1418 | (reverse (substring | ||
| 1419 | text prefix-len))))) | ||
| 1417 | (setq beg-pos (+ beg-pos prefix-len)) | 1420 | (setq beg-pos (+ beg-pos prefix-len)) |
| 1418 | (setq end-pos (- end-pos suffix-len)) | 1421 | (setq end-pos (- end-pos suffix-len)) |
| 1419 | (setq text (substring text prefix-len (- suffix-len))) | 1422 | (setq text (substring text prefix-len |
| 1423 | (and (not (zerop suffix-len)) | ||
| 1424 | (- suffix-len)))) | ||
| 1420 | (delete-region beg-pos end-pos) | 1425 | (delete-region beg-pos end-pos) |
| 1421 | (goto-char beg-pos) | 1426 | (goto-char beg-pos) |
| 1422 | (insert text))) | 1427 | (insert text))) |