diff options
Diffstat (limited to 'center-buffer.el')
-rw-r--r-- | center-buffer.el | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/center-buffer.el b/center-buffer.el index 69d4a90..42c38ef 100644 --- a/center-buffer.el +++ b/center-buffer.el @@ -13,6 +13,15 @@ "The width of the body.") ;;;###autoload +(defun center-buffer-toggle () + "Toggle the centering of the buffer." + (interactive) + (cond + ((car (window-margins (selected-window))) + (center-buffer-off)) + ((center-buffer-on)))) + +;;;###autoload (defun center-buffer-on () "Center the buffer." (interactive) @@ -30,9 +39,5 @@ (interactive) (set-window-margins (selected-window) 0 0)) - - - - (provide 'center-bufrfer) ;;; center-bufrfer.el ends here. |