Compare commits

...

2 Commits

Author SHA1 Message Date
60e3f0c3bb Add center-content-update to hooks 2024-09-24 08:19:27 +02:00
b3c5072ea1 Rename to center-content-mode 2024-09-24 08:18:31 +02:00

View File

@ -1,4 +1,4 @@
;;; center-content.el --- Center buffer content -*- lexical-binding: t; -*- ;;; center-content-mode.el --- Center buffer content -*- lexical-binding: t; -*-
;;; Commentary: ;;; Commentary:
@ -144,9 +144,14 @@ and vertically within the window."
:global nil :global nil
:lighter " Center" :lighter " Center"
(if center-content-mode (if center-content-mode
(progn
(center-content--enable) (center-content--enable)
(center-content--disable))) (add-hook 'post-command-hook #'center-content-update 50 t)
(add-hook 'window-configuration-change-hook #'center-content-update 50 t))
(center-content--disable)
(remove-hook 'post-command-hook #'center-content-update t)
(remove-hook 'window-configuration-change-hook #'center-content-update t)))
(provide 'center-content) (provide 'center-content)
;;; center-content.el ends here ;;; center-content-mode.el ends here