emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/substitute 8431c6b54d 20/39: Make local variables less


From: ELPA Syncer
Subject: [elpa] externals/substitute 8431c6b54d 20/39: Make local variables less verbose
Date: Mon, 16 Jan 2023 11:58:51 -0500 (EST)

branch: externals/substitute
commit 8431c6b54dc83cd010567b5bbf44346c6f19cd05
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@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

[Prev in Thread] Current Thread [Next in Thread]