|
From: | Juri Linkov |
Subject: | bug#45617: <query-replace> loses the edit region. Works in 23.3, broke in 26.3 |
Date: | Thu, 28 Jan 2021 20:42:09 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
> Good idea. I placed this query-replaceX in my .emacs: Thanks. > Here is the *Messages* buffer beginning with the (1) select region: > > Mark set > region: 6576 6582 This means that the fixed function query-replace-read-args is not loaded. > Mark set > Replaced 1 occurrence > Auto-saving...done > Mark set > > What would you like me to do next? I'd recommend you to place the fixed function query-replace-read-args in your .emacs the same way as you placed query-replaceX. If you want, you can rename it, then the caller should be renamed as well. Or you could try to place it in .emacs without renaming: (defun query-replace-read-args (prompt regexp-flag &optional noerror) (unless noerror (barf-if-buffer-read-only)) (save-mark-and-excursion (let* ((from (query-replace-read-from prompt regexp-flag)) (to (if (consp from) (prog1 (cdr from) (setq from (car from))) (query-replace-read-to from prompt regexp-flag)))) (list from to (or (and current-prefix-arg (not (eq current-prefix-arg '-))) (and (plist-member (text-properties-at 0 from) 'isearch-regexp-function) (get-text-property 0 'isearch-regexp-function from))) (and current-prefix-arg (eq current-prefix-arg '-))))))
[Prev in Thread] | Current Thread | [Next in Thread] |