chiark / gitweb /
dot/emacs, el/dot-emacs.el: Formalize the frame-width fudge term.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 15 Apr 2020 21:05:03 +0000 (22:05 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 15 Apr 2020 21:05:03 +0000 (22:05 +0100)
Capture this in a variable so that we can use it in other places.

dot/emacs
el/dot-emacs.el

index 79220bd63e82a205238a83ab54659086ed08d31a..d918bcdb5e40e471aca23d384415682e88968622 100644 (file)
--- a/dot/emacs
+++ b/dot/emacs
 (setq frame-background-mode (if mdw-black-background 'dark 'light)
       frame-inhibit-implied-resize t
       default-frame-alist
-      `((width . ,(+ mdw-column-width
-                    (cond ((<= emacs-major-version 20) 1)
-                          ((= emacs-major-version 26) 3)
-                          (t 0))))
+      `((width . ,(+ mdw-column-width mdw-frame-width-fudge))
        (height . 33)
        (vertical-scroll-bars . right)
        (cursor-type . bar)
index 5c9743fc8bcea49d173663b191541a1a686595ec..46b8fbd945f8fec6f87b1acdbf7105e41ff86471 100644 (file)
@@ -240,6 +240,14 @@ (defun mdw-set-frame-width (columns &optional width)
                        sb-width))
     (mdw-divvy-window width)))
 
+(defvar mdw-frame-width-fudge
+  (cond ((<= emacs-major-version 20) 1)
+       ((= emacs-major-version 26) 3)
+       (t 0))
+  "The number of extra columns to add to the desired frame width.
+
+This is sadly necessary because Emacs 26 is broken in this regard.")
+
 ;; Don't raise windows unless I say so.
 
 (defvar mdw-inhibit-raise-frame nil