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: Juanma Barranquero
Subject: Re: other-window: say there is none if none
Date: Tue, 14 Nov 2006 16:31:22 +0100

On 11/14/06, Richard Stallman <address@hidden> 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




reply via email to

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