From 2aeff0794a2b2b86ffe4325a8c677ebbfb2afa1f Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sat, 29 Aug 2020 20:55:46 +0200 Subject: Use lexical-binding in more tests * test/lib-src/emacsclient-tests.el: * test/lisp/emacs-lisp/hierarchy-tests.el: * test/lisp/eshell/eshell-tests.el: * test/lisp/gnus/gnus-util-tests.el: * test/lisp/progmodes/js-tests.el: * test/lisp/textmodes/bibtex-tests.el: * test/src/editfns-tests.el: * test/src/fns-tests.el: Use lexical-binding. * test/lisp/emacs-lisp/hierarchy-tests.el (hierarchy-leafs-includes-lonely-roots): * test/src/editfns-tests.el (transpose-test-get-byte-positions): * test/src/fns-tests.el (fns-tests-func-arity): Adjust for lexical-binding. --- test/src/editfns-tests.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/src/editfns-tests.el') diff --git a/test/src/editfns-tests.el b/test/src/editfns-tests.el index d7c7aec17c3..de0aeabfe78 100644 --- a/test/src/editfns-tests.el +++ b/test/src/editfns-tests.el @@ -1,4 +1,4 @@ -;;; editfns-tests.el -- tests for editfns.c +;;; editfns-tests.el -- tests for editfns.c -*- lexical-binding:t -*- ;; Copyright (C) 2016-2020 Free Software Foundation, Inc. @@ -124,8 +124,8 @@ "Validate character position to byte position translation." (let ((bytes '())) (dotimes (pos len) - (setq bytes (add-to-list 'bytes (position-bytes (1+ pos)) t))) - bytes)) + (push (position-bytes (1+ pos)) bytes)) + (nreverse bytes))) (ert-deftest transpose-ascii-regions-test () (with-temp-buffer -- cgit v1.2.3