From: rearman Date: Fri, 24 Mar 2023 18:46:36 +0000 (-0400) Subject: Change to other-window-or-split-window X-Git-Url: https://git.earman.xyz/?a=commitdiff_plain;h=a284d06e74d29212493c86d40ee94b595488cdd4;p=emacsinit.git Change to other-window-or-split-window This change makes it work with visual-fill-column's window splitting setup --- diff --git a/init.org b/init.org index f45d99e..9543a76 100644 --- a/init.org +++ b/init.org @@ -873,10 +873,10 @@ I don't want line numbers in the margin unless I am actively trying to go to a l I ripped this defun and binding from [[https://github.com/lem-project/lem][lem]]. Can't live without it now. #+BEGIN_SRC emacs-lisp -(defun other-window-or-split-window (&optional n) +(defun other-window-or-split-window (&optional window) (interactive) (if (= (count-windows) 1) - (split-window-sensibly) + (funcall split-window-preferred-function window) (other-window 1))) (global-set-key (kbd "M-o") 'other-window-or-split-window)