branch: externals/olivetti commit 6a8f400c40a8cb87a0b44ee64ddab4d8f6c2c9d7 Author: Paul Rankin <he...@paulwrankin.com> Commit: Paul Rankin <he...@paulwrankin.com>
Added set-width interactive fun --- olivetti.el | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/olivetti.el b/olivetti.el index 3fc93de..5ebdda4 100644 --- a/olivetti.el +++ b/olivetti.el @@ -151,6 +151,14 @@ mode line. Finally redraw the frame." (setq olivetti-body-width (car (get 'olivetti-body-width 'standard-value))))))) +(defun olivetti-set-width (n) + (interactive + (list (or current-prefix-arg + (read-number "Set text body width (integer or float): " + olivetti-body-width)))) + (setq olivetti-body-width (olivetti-safe-width n)) + (olivetti-set-environment) + (message "Text body width set to %s" olivetti-body-width)) (defun olivetti-set-environment () "Set text body width to `olivetti-body-width' with relative margins."