[21.5] other-frame doesn't work in console mode

Stephen J. Turnbull turnbull at sk.tsukuba.ac.jp
Fri Jun 29 05:53:20 EDT 2007


APPROVE COMMIT 21.5

I really don't understand what the person who wrote the original code
had in mind; I guess they must have wanted a frame that was currently
unobscured by other frames.  But the documentation of frame-visible-p
indicates that a frame may be visible even if obscured, and C-x 5 o
(other-frame) is supposed to raise the chosen frame.

Please watch for bugs where other-frame does *not* raise the frame.
IMO those are not bugs in this function, they're bugs somewhere else
(select-frame-set-input-focus or something it calls).

2007-06-19  Ron Isaacson  <Ron.Isaacson at morganstanley.com>

	* frame.el (other-frame): Stop other-frame cycling through all frames.

--- frame.el.orig	2005-11-13 02:39:28.000000000 -0500
+++ frame.el	2007-06-19 13:55:19.000000000 -0400
@@ -793,13 +793,9 @@
   (let ((frame (selected-frame)))
     (while (> arg 0)
       (setq frame (next-frame frame 'visible-nomini))
-      (while (not (eq (frame-visible-p frame) t))
-	(setq frame (next-frame frame 'visible-nomini)))
       (setq arg (1- arg)))
     (while (< arg 0)
       (setq frame (previous-frame frame 'visible-nomini))
-      (while (not (eq (frame-visible-p frame) t))
-	(setq frame (previous-frame frame 'visible-nomini)))
       (setq arg (1+ arg)))
     (select-frame-set-input-focus frame)))
 


Ron Isaacson writes:
 > Stephen J. Turnbull wrote:
 > > 
 > > Ron Isaacson writes:
 > > 
 > >  > 21.4, which works as you'd expect. From the cvs logs, this was added
 > >  > in frame.el 1.21 (3 years ago -- shows how behind we are). The comment
 > >  > is "synch with Emacs 21.3"
 > > 
 > > Ouch.  That's obviously a dumb thing to do, because even today they
 > > don't have tty frame support in the mainline (although they're talking
 > > about merging a branch with it).
 > > 
 > > I'll take a look, and if I see nothing horrible about it, I'll try
 > > reverting it and see if anyone gets upset. ;-)
 > 
 > Ok, thanks! Simple patch attached.



More information about the XEmacs-Patches mailing list