emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 9fe3bdf: Tweak recent additions in tabify-tests.el


From: Basil L. Contovounesios
Subject: [Emacs-diffs] master 9fe3bdf: Tweak recent additions in tabify-tests.el
Date: Sun, 26 May 2019 06:59:23 -0400 (EDT)

branch: master
commit 9fe3bdf25d63f441e973cdcf88de0b26b53a54a3
Author: Basil L. Contovounesios <address@hidden>
Commit: Basil L. Contovounesios <address@hidden>

    Tweak recent additions in tabify-tests.el
    
    * test/lisp/tabify-tests.el (tabify-tests--test-changes): Rename
    third argument to avoid "lexical argument shadows dynamic variable"
    warnings.  Use mapconcat in place of mapcar+concat.
    (tabify-tests-untabify, tabify-tests-tabify): Quote function symbols
    as such.
---
 test/lisp/tabify-tests.el | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/test/lisp/tabify-tests.el b/test/lisp/tabify-tests.el
index 6670702..db07333 100644
--- a/test/lisp/tabify-tests.el
+++ b/test/lisp/tabify-tests.el
@@ -24,12 +24,12 @@
 (require 'ert)
 (require 'tabify)
 
-(defun tabify-tests--test-changes (fun changes tab-width)
+(defun tabify-tests--test-changes (fun changes width)
   (with-temp-buffer
-    (let ((tab-width tab-width))
-      (insert (apply 'concat (mapcar 'car changes)))
+    (let ((tab-width width))
+      (insert (mapconcat #'car changes ""))
       (funcall fun (point-min) (point-max))
-      (should (equal (buffer-string) (apply 'concat (mapcar 'cadr 
changes)))))))
+      (should (equal (buffer-string) (mapconcat #'cadr changes ""))))))
 
 (ert-deftest tabify-tests-untabify ()
   (let ((changes '(("***\n"        "***\n")
@@ -44,7 +44,7 @@
                    (" \t ***\n"    "   ***\n")
                    ("  \t***\n"    "    ***\n")
                    ("   \t***\n"   "    ***\n"))))
-    (tabify-tests--test-changes 'untabify changes 2)))
+    (tabify-tests--test-changes #'untabify changes 2)))
 
 (ert-deftest tabify-tests-tabify ()
   (let ((changes '(("***\n"        "***\n")
@@ -58,7 +58,7 @@
                    ("\t***\n"      "\t***\n")
                    ("\t ***\n"     "\t ***\n")
                    ("\t\t***\n"    "\t\t***\n"))))
-    (tabify-tests--test-changes 'tabify changes 2)))
+    (tabify-tests--test-changes #'tabify changes 2)))
 
 (ert-deftest tabify-tests-tabify/all-spaces-on-line ()
   (with-temp-buffer



reply via email to

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