branch: externals/substitute commit ff63ce986fe587e244f9e0def810872d2cb30a40 Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Use more descriptive name for local variable --- substitute.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/substitute.el b/substitute.el index ae93ff12ec..cb9735eb86 100644 --- a/substitute.el +++ b/substitute.el @@ -155,15 +155,15 @@ This is the subroutine of `substitute-target' and related." (let (count) (save-excursion (save-restriction - (let ((search 're-search-forward) + (let ((search-direction-function 're-search-forward) (narrow (lambda () (widen) (goto-char (point-min))))) (pcase scope ('below (setq narrow (substitute--current-and-below-motion target))) - ('above (setq search 're-search-backward + ('above (setq search-direction-function 're-search-backward narrow (substitute--current-and-above-motion target))) ('defun (setq narrow (substitute--current-defun)))) (funcall narrow) - (while (funcall search target nil t) + (while (funcall search-direction-function target nil t) (push (match-string-no-properties 0) count) (replace-match sub nil t))))) (run-hook-with-args 'substitute-post-replace-hook