Trigger so-long even in modes with no comment syntax

Refactoring of #2183
This commit is contained in:
Henrik Lissner 2019-12-25 02:16:26 -05:00
parent aa3cb1e7dc
commit fd66b2321e
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -511,7 +511,7 @@ files, so we replace calls to `pp' with the much faster `prin1'."
;; syntax, but in some buffers comment state isn't initialized, leading
;; to a wrong-type-argument: stringp error.
(defun doom-buffer-has-long-lines-p ()
(when (bound-and-true-p comment-use-syntax)
(let ((so-long-skip-leading-comments (bound-and-true-p comment-use-syntax)))
(so-long-detected-long-line-p)))
(setq so-long-predicate #'doom-buffer-has-long-lines-p))