emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/olivetti bee3291 015/134: Fixes #1


From: Stefan Monnier
Subject: [elpa] externals/olivetti bee3291 015/134: Fixes #1
Date: Thu, 25 Apr 2019 09:57:19 -0400 (EDT)

branch: externals/olivetti
commit bee32919842bf424fcf0ce6b303a73ac6c09d105
Author: Paul Rankin <address@hidden>
Commit: Paul Rankin <address@hidden>

    Fixes #1
---
 olivetti.el | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/olivetti.el b/olivetti.el
index e3fd042..0edc10b 100644
--- a/olivetti.el
+++ b/olivetti.el
@@ -129,11 +129,12 @@ mode line. Finally redraw the frame."
                 ((and (floatp n)
                       (< n 1)
                       (> n 0))
-                 (* (window-total-width) n))
-                ((error "`olivetti-body-width' must be an integer or a 
floating point between 0.0 and 1.0"))))
-         (margin
-          (round (/ (- (window-total-width) width) 2))))
-    (set-window-margins (selected-window) margin margin)))
+                 (* (window-total-width) n)))))
+    (if width
+        (let ((margin
+               (round (/ (- (window-total-width) width) 2))))
+          (set-window-margins (selected-window) margin margin))
+      (message "`olivetti-body-width' must be an integer or a float between 0 
and 1"))))
 
 (defun olivetti-toggle-hide-modeline ()
   "Toggle the visibility of the modeline.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]