From 36dff2fdbbf20e2c7f2da2cd1d14d2e5706afc7f Mon Sep 17 00:00:00 2001 From: Abdelhak Bougouffa Date: Sun, 1 Dec 2024 14:01:01 +0100 Subject: [PATCH 1/2] Defer loading `so-long` until needed --- guard-lf.el | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/guard-lf.el b/guard-lf.el index b12e426..5c7e3ac 100644 --- a/guard-lf.el +++ b/guard-lf.el @@ -31,8 +31,6 @@ ;;; Code: -(require 'so-long) - (defgroup guard-lf nil "Guard large files." :prefix "guard-lf-" @@ -88,6 +86,7 @@ (defun guard-lf--line-too-long-p (buffer) "Return non-nil if BUFFER's line is too long." + (require 'so-long) (save-excursion (with-current-buffer buffer (funcall so-long-predicate)))) From fe7a5ef65b0af549ccda78b99d4b6596d090faea Mon Sep 17 00:00:00 2001 From: Abdelhak Bougouffa Date: Sun, 1 Dec 2024 17:02:05 +0100 Subject: [PATCH 2/2] Make the byte-compiler happy --- guard-lf.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/guard-lf.el b/guard-lf.el index 5c7e3ac..904eeae 100644 --- a/guard-lf.el +++ b/guard-lf.el @@ -31,6 +31,8 @@ ;;; Code: +(eval-when-compile (require 'so-long)) + (defgroup guard-lf nil "Guard large files." :prefix "guard-lf-"