From: Stefan Bund Date: Wed, 11 Oct 2017 16:08:22 +0000 (+0200) Subject: my-setup-windows: balance windows horizontally X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=1d07e4155775233b3a89ded078cb98248bbba4c8;p=emacs-init.git my-setup-windows: balance windows horizontally --- diff --git a/.gitmodules b/.gitmodules index b1f65c9..d365e1d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -39,3 +39,6 @@ url = git://g0dil.de/emacsstuff.git [submodule "solarized-emacs"] path = solarized-emacs url = https://github.com/bbatsov/solarized-emacs.git +[submodule "pjb-emacs"] + path = pjb-emacs + url = https://github.com/informatimago/emacs.git diff --git a/pjb-emacs b/pjb-emacs new file mode 160000 index 0000000..0de906e --- /dev/null +++ b/pjb-emacs @@ -0,0 +1 @@ +Subproject commit 0de906e8f5f8297252c4b784dff2daf8df50c87f diff --git a/setup/mywin.el b/setup/mywin.el index 7d961c1..b33e6a5 100644 --- a/setup/mywin.el +++ b/setup/mywin.el @@ -145,8 +145,7 @@ window smaller than MIN-HEIGHT lines." (not (member name setup-my-windows-precious-buffers))) return w) firstwindow)) (when (and distribute (> (length newtopwindows) 1)) - ;;(balance-windows) - ) + (pjb-balance-windows t)) (select-window newwindow) (if (not (member (buffer-name currentbuffer) setup-my-windows-junk-buffers)) (switch-to-buffer currentbuffer)))) diff --git a/setup/pjb-emacs.el b/setup/pjb-emacs.el new file mode 100644 index 0000000..39a07ab --- /dev/null +++ b/setup/pjb-emacs.el @@ -0,0 +1,11 @@ +(let ((pjb-libdir (concat (file-name-directory + (directory-file-name + (file-name-directory + (or load-file-name + (when (boundp 'bytecomp-filename) bytecomp-filename) + buffer-file-name)))) + "pjb-emacs"))) + (add-to-list 'load-path pjb-libdir) + (loop for feature in '(pjb-cl-magic pjb-sources pjb-strings pjb-list pjb-cl pjb-utilities) + do (require feature)) + (load-file (concat (file-name-as-directory pjb-libdir) "pjb-emacs-balance-windows.el")))