From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Juanma Barranquero" Newsgroups: gmane.emacs.bugs Subject: Re: other-window: say there is none if none Date: Tue, 14 Nov 2006 16:31:22 +0100 Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1163518367 22073 80.91.229.2 (14 Nov 2006 15:32:47 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 14 Nov 2006 15:32:47 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 14 16:32:43 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 1Gk0GY-0001Du-T5 for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Nov 2006 16:32:03 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gk0GX-0000db-PC for geb-bug-gnu-emacs@m.gmane.org; Tue, 14 Nov 2006 10:32:01 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gk0GU-0000Zm-MI for bug-gnu-emacs@gnu.org; Tue, 14 Nov 2006 10:31:58 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gk0GR-0000UH-N3 for bug-gnu-emacs@gnu.org; Tue, 14 Nov 2006 10:31:57 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gk0GR-0000U2-Ip for bug-gnu-emacs@gnu.org; Tue, 14 Nov 2006 10:31:55 -0500 Original-Received: from [64.233.166.180] (helo=py-out-1112.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Gk0GS-0001cC-71 for bug-gnu-emacs@gnu.org; Tue, 14 Nov 2006 10:31:56 -0500 Original-Received: by py-out-1112.google.com with SMTP id p76so971781pyb for ; Tue, 14 Nov 2006 07:31:22 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=YaqjgMDdet/n9HdQCwurKjJJAXmJkghfcc+GSz9N/Q0mpwTCx/Bctd5sfX5G9ADS+3C82b0bGwW8w8i/yi5UurhDZm0OpoUeOZ1NmQ1TDsAH5RNM9qeQYv7xec0dFfu3b+BuHE8LdB1/KTgxV2Et3OmWn1cuGPqYklXD1HjfNDA= Original-Received: by 10.35.43.10 with SMTP id v10mr1147496pyj.1163518282232; Tue, 14 Nov 2006 07:31:22 -0800 (PST) Original-Received: by 10.35.95.18 with HTTP; Tue, 14 Nov 2006 07:31:22 -0800 (PST) Original-To: rms@gnu.org In-Reply-To: Content-Disposition: inline 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:15418 Archived-At: On 11/14/06, Richard Stallman wrote: > - Fselect_window (window, Qnil); > + if (!EQ (window, old)) > + Fselect_window (window, Qnil); > + else if (Finteractive_p () && EQ (window, Fnext_window (window, Qnil, Qnil))) > + error ("No other windows"); > > Displaying a message can't hurt > when the command is called interactively, but this change would cause > programs that call other-window to get errors where they didn't get > errors before. Hmmm. According to interactive-p's docstring: Return t if the function was run directly by user input. This means that the function was called with `call-interactively' (which includes being called as the binding of a key) and input is currently coming from the keyboard (not in keyboard macro), and Emacs is not running in batch mode (`noninteractive' is nil). so if a program gets an error from a section of code protected by interactive-p, it is trying *very hard* to fake being interactive, and it gets what it asked for. :) > This doesn't need to be changed now, so please leave it alone. Of course. I was just trying to be helpful. Perhaps Dan wants to patch his own Emacs :) /L/e/k/t/u