Skip to content

Commit

Permalink
Merge pull request #11 from abougouffa/tweak/defer-so-long
Browse files Browse the repository at this point in the history
Defer loading `so-long` until needed
  • Loading branch information
jcs090218 authored Dec 1, 2024
2 parents 802b3ff + fe7a5ef commit ca18c0e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion guard-lf.el
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

;;; Code:

(require 'so-long)
(eval-when-compile (require 'so-long))

(defgroup guard-lf nil
"Guard large files."
Expand Down Expand Up @@ -88,6 +88,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))))
Expand Down

0 comments on commit ca18c0e

Please sign in to comment.