]> git.eshelyaron.com Git - emacs.git/commitdiff
Use lexical-binding in most vc tests
authorStefan Kangas <stefankangas@gmail.com>
Tue, 28 Apr 2020 08:36:34 +0000 (10:36 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Tue, 28 Apr 2020 08:36:34 +0000 (10:36 +0200)
* test/lisp/vc/add-log-tests.el:
* test/lisp/vc/diff-mode-tests.el:
* test/lisp/vc/ediff-ptch-tests.el:
* test/lisp/vc/smerge-mode-tests.el:
* test/lisp/vc/vc-hg-tests.el:
* test/lisp/vc/vc-tests.el: Use lexical-binding.

* test/lisp/vc/add-log-tests.el
(add-log-current-defun-deftest): Silence byte-compiler.

test/lisp/vc/add-log-tests.el
test/lisp/vc/diff-mode-tests.el
test/lisp/vc/ediff-ptch-tests.el
test/lisp/vc/smerge-mode-tests.el
test/lisp/vc/vc-hg-tests.el
test/lisp/vc/vc-tests.el

index fc928b02c3b6c0eb17dff94ad5d1502be3a9f446..f256945ee42979ad39b0ab7029547b650aff0f33 100644 (file)
@@ -1,4 +1,4 @@
-;;; add-log-tests.el --- Test suite for add-log.
+;;; add-log-tests.el --- Test suite for add-log.  -*- lexical-binding:t -*-
 
 ;; Copyright (C) 2013-2020 Free Software Foundation, Inc.
 
 (require 'ert)
 (require 'add-log)
 
-(defmacro add-log-current-defun-deftest (name doc major-mode
+(defmacro add-log-current-defun-deftest (name doc mode
                                              content marker expected-defun)
   "Generate an ert test for mode-own `add-log-current-defun-function'.
-Run `add-log-current-defun' at the point where MARKER specifies in a
-buffer which content is CONTENT under MAJOR-MODE. Then it compares the
-result with EXPECTED-DEFUN."
+Run `add-log-current-defun' at the point where MARKER specifies
+in a buffer which content is CONTENT under major mode MODE. Then
+it compares the result with EXPECTED-DEFUN."
   (let ((xname (intern (concat "add-log-current-defun-test-"
                               (symbol-name name)
                               ))))
@@ -39,7 +39,7 @@ result with EXPECTED-DEFUN."
        (with-temp-buffer
         (insert ,content)
         (goto-char (point-min))
-        (funcall ',major-mode)
+        (funcall ',mode)
         (should (equal (when (search-forward ,marker nil t)
                          (replace-match "" nil t)
                          (add-log-current-defun))
index 26e9f26fe241a3aa9344154ec0ed9a510ed00be6..e497ed204df22f28a8c53eb1c36ae25eb1fbdd5b 100644 (file)
@@ -1,3 +1,5 @@
+;;; diff-mode-tests.el --- Tests for diff-mode.el  -*- lexical-binding:t -*-
+
 ;; Copyright (C) 2017-2020 Free Software Foundation, Inc.
 
 ;; Author: Dima Kogan <dima@secretsauce.net>
index ab44e23033cfd2163dcf4a99e7ed728141ef7965..a3a592bb62350bc7ea528b11ca05b09f6b5be601 100644 (file)
@@ -1,4 +1,4 @@
-;;; ediff-ptch-tests.el --- Tests for ediff-ptch.el
+;;; ediff-ptch-tests.el --- Tests for ediff-ptch.el  -*- lexical-binding:t -*-
 
 ;; Copyright (C) 2016-2020 Free Software Foundation, Inc.
 
index c76fc1724028ed96ca7287cd4c439ea31582f20c..5b15a0931d1d5ef2a4a7c88b76885c2165adfa0e 100644 (file)
@@ -1,3 +1,5 @@
+;;; smerge-mode-tests.el --- Tests for smerge-mode.el  -*- lexical-binding:t -*-
+
 ;; Copyright (C) 2017-2020 Free Software Foundation, Inc.
 
 ;; Maintainer: emacs-devel@gnu.org
index 01d197574fccb13ff131de0a5d3e363487df1a41..e4a20bbf2daee780ae8142caf614c933f846eaac 100644 (file)
@@ -1,4 +1,4 @@
-;;; vc-hg-tests.el --- tests for vc/vc-hg.el
+;;; vc-hg-tests.el --- tests for vc/vc-hg.el  -*- lexical-binding:t -*-
 
 ;; Copyright (C) 2016-2020 Free Software Foundation, Inc.
 
index 43d24486ed1d1e5da20d3e11cdd9400ba9130030..ff85e2f904ead7a2320ce4a4b5b49b355bd8308a 100644 (file)
@@ -1,4 +1,4 @@
-;;; vc-tests.el --- Tests of different backends of vc.el
+;;; vc-tests.el --- Tests of different backends of vc.el  -*- lexical-binding:t -*-
 
 ;; Copyright (C) 2014-2020 Free Software Foundation, Inc.