Skip to content

Instantly share code, notes, and snippets.

@sirn
Created November 13, 2009 06:30
Show Gist options
  • Save sirn/233641 to your computer and use it in GitHub Desktop.
Save sirn/233641 to your computer and use it in GitHub Desktop.
;; Resize Frame on Horizontal Splitting.
;; Written by Kridsada Thanabulpong <naises@gmail.com>.
;; Published as public domain.
(setq default-width (frame-width))
(when window-system
(add-hook 'window-configuration-change-hook
'(lambda ()
(setq windows ())
(dolist (w (window-list))
(setq windows (cons (car (window-edges w)) windows)))
(set-frame-width (selected-frame)
(* default-width
(length (delete-dups windows)))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment