From 42acfab4818faa00f0143cb0d8ae99ba3480ceba Mon Sep 17 00:00:00 2001 From: Pierre Rouleau Date: Mon, 12 Jan 2026 14:55:32 -0500 Subject: [PATCH] Fix Emacs 30 byte-compiler warning: use lexical-binding * Use lexical-binding in both files. * Replace coerce by cl-coerce, the new cl-lib function name replacing the older name. Also require cl-lib explicitly to prevent warning regardless of what ert-expectations load. --- coverage.el | 2 +- test/coverage-test.el | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/coverage.el b/coverage.el index 8d8ab59..4e83871 100644 --- a/coverage.el +++ b/coverage.el @@ -1,4 +1,4 @@ -;;; coverage.el --- Code coverage line highlighting +;;; coverage.el --- Code coverage line highlighting -*-lexical-binding: t-*- ;; Copyright (C) 2016 Powershop NZ Ltd. diff --git a/test/coverage-test.el b/test/coverage-test.el index 89626be..98f0590 100644 --- a/test/coverage-test.el +++ b/test/coverage-test.el @@ -1,7 +1,8 @@ -;;; Package -- summary +;;; Package -- summary -*-lexical-binding: t-*- ;;; Commentary: ;;; Code: (require 'ert) +(require 'cl-lib) (require 'ert-expectations) (require 'coverage) (require 'el-mock) @@ -15,11 +16,11 @@ (defvar example-json) (setq example-json `((provider-1 (coverage - (/foo/bar\.rb . ,(coerce bar-results 'array))) + (/foo/bar\.rb . ,(cl-coerce bar-results 'array))) (timestamp . 1234567890)) (provider-2 (coverage - (/baz/qux/quux\.rb . ,(coerce quux-results 'array))) + (/baz/qux/quux\.rb . ,(cl-coerce quux-results 'array))) (timestamp . 6789012345)))) (expectations