From 509db9bbdef21063d18085140719b1ed2d8c8b16 Mon Sep 17 00:00:00 2001 From: larstvei Date: Sat, 21 Sep 2024 00:26:46 +0200 Subject: [PATCH] Add an update function --- center-content.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/center-content.el b/center-content.el index 49df854..4085f3d 100644 --- a/center-content.el +++ b/center-content.el @@ -127,6 +127,13 @@ ;; Restore the original mode-line-format (setq mode-line-format center-content--original-mode-line-format)) +(defun center-content-update () + "Updates the centering if `center-content-mode' is enabled." + (interactive) + (when (bound-and-true-p center-content-mode) + (center-content--disable) + (center-content--enable))) + ;;;###autoload (define-minor-mode center-content-mode "Toggle horizontal and vertical centering of buffer content.