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

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

[nongnu] elpa/visual-fill-column 15b5cd1410 007/137: Remove option to us


From: ELPA Syncer
Subject: [nongnu] elpa/visual-fill-column 15b5cd1410 007/137: Remove option to use a fraction for `visual-fill-column-width'.
Date: Sun, 2 Jan 2022 22:59:07 -0500 (EST)

branch: elpa/visual-fill-column
commit 15b5cd141072fc295abc41959318d70767b9fc44
Author: Joost Kremers <joostkremers@fastmail.fm>
Commit: Joost Kremers <joostkremers@fastmail.fm>

    Remove option to use a fraction for `visual-fill-column-width'.
---
 README.md             |  2 +-
 visual-fill-column.el | 17 +++++------------
 2 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/README.md b/README.md
index d83549ab81..67eef23eab 100644
--- a/README.md
+++ b/README.md
@@ -21,7 +21,7 @@ Widening the margin causes the fringe to be pushed inward. 
Since the fringe is v
 
 ## Options ##
 
-`visual-fill-column-width`: column at which to wrap lines. If set to `nil` 
(the default), use the value of `fill-column` instead. Can also be set to a 
fraction between `0` and `1`, in which case the text width is relative to the 
window width.
+`visual-fill-column-width`: column at which to wrap lines. If set to `nil` 
(the default), use the value of `fill-column` instead.
 
 `visual-fill-column-center-text`: if set to `t`, centre the text area in the 
window. By default, the text is displayed at the window’s (left) edge, 
mimicking the effect of `fill-column`.
 
diff --git a/visual-fill-column.el b/visual-fill-column.el
index a2dd473ca0..5368341ce7 100644
--- a/visual-fill-column.el
+++ b/visual-fill-column.el
@@ -37,13 +37,10 @@
 (defcustom visual-fill-column-width nil
   "Width of the text area.
 By default, the global value of `fill-column' is used, but if
-this option is set to a value, it is used instead. Alternatively,
-the value can be specified relative to the window width. In this
-case, it must be a value between 0 and 1."
+this option is set to a value, it is used instead."
   :group 'visual-fill-column
   :type '(choice (const :tag "Use `fill-column'" :value nil)
-                 (integer :tag "Absolute width" :value 70)
-                 (float :tag "Relative width:" :value 0.5)))
+                 (integer :tag "Specify width" :value 70)))
 (make-variable-buffer-local 'visual-fill-column-width)
 (put 'visual-fill-column-width 'safe-local-variable 'numberp)
 
@@ -119,13 +116,9 @@ in which `visual-line-mode' is active as well."
          (total-width (window-total-width window))
          (width (or visual-fill-column-width
                     fill-column))
-         (margins (cond
-                   ((and (floatp width)
-                         (< 0 width 1))
-                    (- total-width (truncate (* total-width width))))
-                   (t (if (< (- total-width width) 0) ; margins must be >= 0
-                          0
-                        (- total-width width)))))
+         (margins (if (< (- total-width width) 0) ; margins must be >= 0
+                      0
+                    (- total-width width)))
          (left (if visual-fill-column-center-text
                    (/ margins 2)
                  0))



reply via email to

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