From 9fe3bdf25d63f441e973cdcf88de0b26b53a54a3 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Sun, 26 May 2019 11:23:03 +0100 Subject: [PATCH] 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 6670702eace..db073338b37 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 -- 2.39.5