summaryrefslogtreecommitdiff
path: root/.config/emacs/modules
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-10-19 17:08:29 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-10-19 17:08:29 +0200
commitd5670d1d0448cb01a7dbebf0dfa2d9c021d132ea (patch)
treeb65025a9f010963a7cf9af999c8ef50243f3cb26 /.config/emacs/modules
parent8fff29be7639d6c4bc1900c7c49a41f30318b053 (diff)
emacs: Use page-break-lines-mode in particular modes
Diffstat (limited to '.config/emacs/modules')
-rw-r--r--.config/emacs/modules/mm-theme.el9
1 files changed, 6 insertions, 3 deletions
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