chiark
/
gitweb
/
~mdw
/
profile
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2a5c433
)
el/dot-emacs.el: New function to make Emacs frames a sensible width.
author
Mark Wooding
<mdw@distorted.org.uk>
Sat, 2 Sep 2017 14:17:42 +0000
(15:17 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sat, 2 Sep 2017 14:17:42 +0000
(15:17 +0100)
el/dot-emacs.el
patch
|
blob
|
blame
|
history
diff --git
a/el/dot-emacs.el
b/el/dot-emacs.el
index 5314fd90cbdd5e0f761814bd1cfb010e3dd52a8b..c6c038c7bcd14b2c70698c1b6fb3e2271ba84877 100644
(file)
--- a/
el/dot-emacs.el
+++ b/
el/dot-emacs.el
@@
-217,6
+217,19
@@
(defun mdw-divvy-window (&optional width)
(other-window 1))
(select-window win)))
(other-window 1))
(select-window win)))
+(defun mdw-set-frame-width (columns &optional width)
+ (interactive "nColumns:
+P")
+ (setq width (cond (width (prefix-numeric-value width))
+ ((and window-system (mdw-emacs-version-p 22))
+ mdw-column-width)
+ (t (1+ mdw-column-width))))
+ (let ((sb-width (mdw-horizontal-window-overhead)))
+ (set-frame-width (selected-frame)
+ (- (* columns (+ width sb-width))
+ sb-width))
+ (mdw-divvy-window width)))
+
;; Don't raise windows unless I say so.
(defvar mdw-inhibit-raise-frame nil
;; Don't raise windows unless I say so.
(defvar mdw-inhibit-raise-frame nil