From d5670d1d0448cb01a7dbebf0dfa2d9c021d132ea Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sat, 19 Oct 2024 17:08:29 +0200 Subject: emacs: Use page-break-lines-mode in particular modes --- .config/emacs/modules/mm-theme.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to '.config/emacs/modules/mm-theme.el') diff --git a/.config/emacs/modules/mm-theme.el b/.config/emacs/modules/mm-theme.el index 7771548..6c8eab8 100644 --- a/.config/emacs/modules/mm-theme.el +++ b/.config/emacs/modules/mm-theme.el @@ -178,13 +178,16 @@ See also the `mm-theme-background-opacity' variable." (use-package page-break-lines :ensure t :hook (after-init . global-page-break-lines-mode) - :init + :config + (dolist (mode '(c-mode c++-mode gsp-ts-mode)) + (add-to-list 'page-break-lines-modes mode) + (let ((ts-mode (mm-mode-to-ts-mode mode))) + (when (fboundp ts-mode) + (add-to-list 'page-break-lines-modes ts-mode)))) (add-hook 'change-major-mode-hook (defun mm-theme--set-page-break-max-width () (setopt page-break-lines-max-width fill-column))) - (global-page-break-lines-mode) - :config ;; Since the ā€˜^Lā€™ character is replaced by a horizontal rule, the ;; cursor should appear below the horizontal rule. When moving ;; backwards we need to account for the fact that the cursor is -- cgit v1.2.3