Fix #2183: suppress so-long when no comment syntax
Hopefully a better solution can be found.
This commit is contained in:
parent
7e0c093bcf
commit
c0116d1447
1 changed files with 8 additions and 1 deletions
|
@ -501,7 +501,14 @@ files, so we replace calls to `pp' with the much faster `prin1'."
|
||||||
auto-composition-mode
|
auto-composition-mode
|
||||||
undo-tree-mode
|
undo-tree-mode
|
||||||
highlight-indent-guides-mode
|
highlight-indent-guides-mode
|
||||||
hl-fill-column-mode)))
|
hl-fill-column-mode))
|
||||||
|
;; HACK Fix #2183: `so-long-detected-long-line-p' tries to parse comment
|
||||||
|
;; 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)
|
||||||
|
(so-long-detected-long-line-p)))
|
||||||
|
(setq so-long-predicate #'doom-buffer-has-long-lines-p))
|
||||||
|
|
||||||
|
|
||||||
(use-package! undo-tree
|
(use-package! undo-tree
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue