From d8d13f2fccadfdd999a818a5c320f6d0f0d428fe Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Mon, 8 Aug 2022 13:18:36 +0200 Subject: [PATCH] Remove redundant local variables in tests * test/lisp/calc/calc-tests.el: * test/lisp/progmodes/python-tests.el: Remove redundant local variables. * test/src/coding-tests.el: Pacify byte-compiler without using local variable. --- test/lisp/calc/calc-tests.el | 4 ---- test/lisp/progmodes/python-tests.el | 4 ---- test/src/coding-tests.el | 25 +++++++++++-------------- 3 files changed, 11 insertions(+), 22 deletions(-) diff --git a/test/lisp/calc/calc-tests.el b/test/lisp/calc/calc-tests.el index 64e59f5b9b4..cd984f7ff7e 100644 --- a/test/lisp/calc/calc-tests.el +++ b/test/lisp/calc/calc-tests.el @@ -818,7 +818,3 @@ An existing calc stack is reused, otherwise a new one is created." (provide 'calc-tests) ;;; calc-tests.el ends here - -;; Local Variables: -;; bug-reference-url-format: "https://debbugs.gnu.org/%s" -;; End: diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index eb571226909..e3c8d5554a1 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el @@ -6075,8 +6075,4 @@ buffer with overlapping strings." (provide 'python-tests) -;; Local Variables: -;; indent-tabs-mode: nil -;; End: - ;;; python-tests.el ends here diff --git a/test/src/coding-tests.el b/test/src/coding-tests.el index de4ddb546df..f65d575d0c2 100644 --- a/test/src/coding-tests.el +++ b/test/src/coding-tests.el @@ -61,16 +61,17 @@ ;; Return the contents (specified by CONTENT-TYPE; ascii, latin, or ;; binary) of a test file. (defun coding-tests-file-contents (content-type) - (let* ((ascii "ABCDEFGHIJKLMNOPQRSTUVWXYZ\n") - (latin (concat ascii "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏ\n")) - (binary (string-to-multibyte - (concat (string-as-unibyte latin) - (unibyte-string #xC0 #xC1 ?\n))))) - (cond ((eq content-type 'ascii) ascii) - ((eq content-type 'latin) latin) - ((eq content-type 'binary) binary) - (t - (error "Invalid file content type: %s" content-type))))) + (with-suppressed-warnings ((obsolete string-as-unibyte)) + (let* ((ascii "ABCDEFGHIJKLMNOPQRSTUVWXYZ\n") + (latin (concat ascii "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏ\n")) + (binary (string-to-multibyte + (concat (string-as-unibyte latin) + (unibyte-string #xC0 #xC1 ?\n))))) + (cond ((eq content-type 'ascii) ascii) + ((eq content-type 'latin) latin) + ((eq content-type 'binary) binary) + (t + (error "Invalid file content type: %s" content-type)))))) ;; Generate FILE with CONTENTS encoded by CODING-SYSTEM. ;; whose encoding specified by CODING-SYSTEM. @@ -429,9 +430,5 @@ '((iso-latin-1 3) (us-ascii 1 3)))) (should-error (check-coding-systems-region "å" nil '(bad-coding-system)))) -;; Local Variables: -;; byte-compile-warnings: (not obsolete) -;; End: - (provide 'coding-tests) ;;; coding-tests.el ends here -- 2.39.2