Subject: Re: bug#27717: other-window when there is no other window

From: 積丹尼 Dan Jacobson <[email-masked]>
Date: Mon, 17 Jul 2017 16:18:52 +0800

OK. I think this would be a great redefinition of C-x o:

(defun other-window-or-switch-buffer ()
  "Call `other-window' if more than one window is visible, switch
to next buffer otherwise."
  (interactive)
  (if (one-window-p)
	  (switch-to-buffer nil)
	(other-window 1)))
(global-set-key (kbd "C-x o") 'other-window-or-switch-buffer)

(I don't use frames. So don't know much about that part.)