bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: other-window: say there is none if none


From: Drew Adams
Subject: RE: other-window: say there is none if none
Date: Sun, 12 Nov 2006 16:39:09 -0800

> C-x o runs the command other-window. But if there is none, it
> should say something, else dumbo me will just keep hitting it.

It might not be what you would like, but another approach is to call
`other-frame' if there is no other window in the same frame. I bind `C-x o'
to this:

(defun other-window-or-frame (arg)
  "`other-frame', if `one-window-p'; otherwise, `other-window'."
  (interactive "p")
  (if (one-window-p) (other-frame arg) (other-window arg)))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]