branch: externals/substitute
commit 8431c6b54dc83cd010567b5bbf44346c6f19cd05
Author: Protesilaos Stavrou <i...@protesilaos.com>
Commit: Protesilaos Stavrou <i...@protesilaos.com>

    Make local variables less verbose
---
 substitute.el | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/substitute.el b/substitute.el
index 810a74a66c..d948eaa3dd 100644
--- a/substitute.el
+++ b/substitute.el
@@ -151,15 +151,15 @@ This is the subroutine of `substitute-target' and 
related."
   (let (count)
     (save-excursion
       (save-restriction
-        (let ((search-direction-function 're-search-forward)
-              (scope-function (lambda () (widen) (goto-char (point-min)))))
+        (let ((search-fn 're-search-forward)
+              (scope-fn (lambda () (widen) (goto-char (point-min)))))
           (pcase scope
-            ('below (setq scope-function (substitute--current-and-below-motion 
target)))
-            ('above (setq search-direction-function 're-search-backward
-                          scope-function (substitute--current-and-above-motion 
target)))
-            ('defun (setq scope-function (substitute--current-defun))))
-          (funcall scope-function)
-          (while (funcall search-direction-function target nil t)
+            ('below (setq scope-fn (substitute--current-and-below-motion 
target)))
+            ('above (setq search-fn 're-search-backward
+                          scope-fn (substitute--current-and-above-motion 
target)))
+            ('defun (setq scope-fn (substitute--current-defun))))
+          (funcall scope-fn)
+          (while (funcall search-fn target nil t)
             (push (match-string-no-properties 0) count)
             (replace-match sub nil t)))))
     (run-hook-with-args 'substitute-post-replace-hook

Reply via email to