mirror of
https://github.com/doomemacs/doomemacs.git
synced 2026-05-08 12:57:01 -07:00
feat(word-wrap): accept minor modes in +word-wrap-visual-modes
And instead of disabling +word-wrap in org-mode wholesale, only disable it in the presence of `org-indent-mode` (or `markdown-indent-mode`) -- modes that use `line-prefix`/`wrap-prefix` text properties that could conflict with `adaptive-wrap-prefix-mode` (which the word-wrap module uses).
This commit is contained in:
parent
c060cee5f4
commit
07e7b4b41e
2 changed files with 7 additions and 4 deletions
|
|
@ -48,7 +48,11 @@ wrapped at `fill-column' by configuring `+word-wrap-fill-style'."
|
|||
(progn
|
||||
(setq-local
|
||||
+word-wrap--major-mode-is-visual
|
||||
(memq major-mode +word-wrap-visual-modes)
|
||||
(cl-loop for mode in +word-wrap-visual-modes
|
||||
if (or (eq major-mode mode)
|
||||
(and (boundp mode)
|
||||
(symbol-value mode)))
|
||||
return t)
|
||||
+word-wrap--major-mode-is-text
|
||||
(memq major-mode +word-wrap-text-modes)
|
||||
+word-wrap--enable-adaptive-wrap-mode
|
||||
|
|
|
|||
|
|
@ -36,9 +36,8 @@ will not be affected."
|
|||
:type '(repeat symbol)
|
||||
:group '+word-wrap)
|
||||
|
||||
(defcustom +word-wrap-visual-modes '(org-mode)
|
||||
"Major-modes where `+word-wrap-mode' should not use
|
||||
`adaptive-wrap-prefix-mode'.")
|
||||
(defcustom +word-wrap-visual-modes '(org-indent-mode markdown-indent-mode)
|
||||
"Major or minor modes where `adaptive-wrap-prefix-mode' show not be used."
|
||||
:type '(repeat symbol)
|
||||
:group '+word-wrap)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue