(defun goto-next-window (&optional arg) (interactive "P") (cond ((one-window-p) (select-window (split-window-horizontally))) (arg (other-window -1)) (t (other-window 1)))) (global-set-key "\C-o" 'goto-next-window) (global-set-key "\M-\C-o" 'open-line)