From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: RE: other-window: say there is none if none Date: Sun, 12 Nov 2006 16:39:09 -0800 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1163378416 5319 80.91.229.2 (13 Nov 2006 00:40:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 13 Nov 2006 00:40:16 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Nov 13 01:40:12 2006 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GjPrw-0002e0-28 for geb-bug-gnu-emacs@m.gmane.org; Mon, 13 Nov 2006 01:40:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GjPrv-0001Bh-GA for geb-bug-gnu-emacs@m.gmane.org; Sun, 12 Nov 2006 19:40:11 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GjPrr-0001Aw-V9 for bug-gnu-emacs@gnu.org; Sun, 12 Nov 2006 19:40:08 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GjPro-0001AM-T3 for bug-gnu-emacs@gnu.org; Sun, 12 Nov 2006 19:40:07 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GjPro-0001AJ-PS for bug-gnu-emacs@gnu.org; Sun, 12 Nov 2006 19:40:04 -0500 Original-Received: from [148.87.113.118] (helo=rgminet01.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1GjPro-0004Dp-Mr for bug-gnu-emacs@gnu.org; Sun, 12 Nov 2006 19:40:04 -0500 Original-Received: from rgmgw2.us.oracle.com (rgmgw2.us.oracle.com [138.1.186.111]) by rgminet01.oracle.com (Switch-3.2.4/Switch-3.1.6) with ESMTP id kAD0dlb5010758; Sun, 12 Nov 2006 17:39:47 -0700 Original-Received: from rcsmt251.oracle.com (rcsmt251.oracle.com [148.87.90.196]) by rgmgw2.us.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id kAD0dkub012675; Sun, 12 Nov 2006 17:39:47 -0700 Original-Received: from dhcp-amer-csvpn-gw1-141-144-64-7.vpn.oracle.com by rcsmt250.oracle.com with ESMTP id 2196373901163378353; Sun, 12 Nov 2006 17:39:13 -0700 Original-To: "Dan Jacobson" , X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 In-Reply-To: Importance: Normal X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:15413 Archived-At: > 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)))