unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* `fancy-splash-frame' query
@ 2002-07-31  0:45 John Paul Wallington
  2002-07-31 21:58 ` Richard Stallman
  0 siblings, 1 reply; 3+ messages in thread
From: John Paul Wallington @ 2002-07-31  0:45 UTC (permalink / raw)


Hi!

Presently, picking "About Emacs" from the Help menu when I have
multiple frames puts the splash screen in a different frame from the
selected one.

Here is a `fancy-splash-frame' that checks the selected frame first
and returns the first suitable frame rather than the last.

Is the present behaviour problematic?  Is this version okay (I have
only tested it lightly) ?


2002-07-31  John Paul Wallington  <jpw@shootybangbang.com>

	* startup.el (fancy-splash-frame): Check selected frame first.
	Use `visible-frame-list' instead of `frame-list'.  Return first
	suitable frame instead of last.

Index: startup.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/startup.el,v
retrieving revision 1.302
diff -u -r1.302 startup.el
*** startup.el	14 Jul 2002 15:29:56 -0000	1.302
--- startup.el	31 Jul 2002 00:15:55 -0000
***************
*** 1305,1315 ****
  Returning non-nil does not mean we should necessarily
  use the fancy splash screen, but if we do use it,
  we put it on this frame."
!   (let (chosen-frame)
!     (dolist (frame (frame-list))
!       (if (and (frame-visible-p frame)
! 	       (not (window-minibuffer-p (frame-selected-window frame))))
! 	  (setq chosen-frame frame)))
      chosen-frame))
  
  (defun use-fancy-splash-screens-p ()
--- 1305,1317 ----
  Returning non-nil does not mean we should necessarily
  use the fancy splash screen, but if we do use it,
  we put it on this frame."
!   (let ((frames (cons (selected-frame) (visible-frame-list)))
! 	chosen-frame)
!     (while (not chosen-frame)
!       (let ((frame (pop frames)))
! 	(if (and (frame-visible-p frame)
! 		 (not (window-minibuffer-p (frame-selected-window frame))))
! 	    (setq chosen-frame frame))))
      chosen-frame))
  
  (defun use-fancy-splash-screens-p ()


-- 
John Paul Wallington

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: `fancy-splash-frame' query
@ 2002-07-31  1:36 John Paul Wallington
  0 siblings, 0 replies; 3+ messages in thread
From: John Paul Wallington @ 2002-07-31  1:36 UTC (permalink / raw)


I wrote:

> Presently, picking "About Emacs" from the Help menu when I have
> multiple frames puts the splash screen in a different frame from the
> selected one.
> 
> Here is a `fancy-splash-frame' that checks the selected frame first
> and returns the first suitable frame rather than the last.
> 
> Is the present behaviour problematic?  Is this version okay (I have
> only tested it lightly) ?

Oh boy!  Sorry, that version stunk; it would lose if it ran out of
frames.  I am a degenerate for testing it so lightly.

Here's an alternative...

2002-07-31  John Paul Wallington  <jpw@shootybangbang.com>

	* startup.el (fancy-splash-frame): Check selected frame last.

Index: startup.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/startup.el,v
retrieving revision 1.302
diff -u -r1.302 startup.el
--- startup.el	14 Jul 2002 15:29:56 -0000	1.302
+++ startup.el	31 Jul 2002 01:29:26 -0000
@@ -1306,7 +1306,7 @@
 use the fancy splash screen, but if we do use it,
 we put it on this frame."
   (let (chosen-frame)
-    (dolist (frame (frame-list))
+    (dolist (frame (append (frame-list) (list (selected-frame))))
       (if (and (frame-visible-p frame)
 	       (not (window-minibuffer-p (frame-selected-window frame))))
 	  (setq chosen-frame frame)))

-- 
John Paul Wallington

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: `fancy-splash-frame' query
  2002-07-31  0:45 John Paul Wallington
@ 2002-07-31 21:58 ` Richard Stallman
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Stallman @ 2002-07-31 21:58 UTC (permalink / raw)
  Cc: emacs-devel

It seems good--please put it in.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-07-31 21:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-31  1:36 `fancy-splash-frame' query John Paul Wallington
  -- strict thread matches above, loose matches on Subject: below --
2002-07-31  0:45 John Paul Wallington
2002-07-31 21:58 ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).