From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: John Paul Wallington Newsgroups: gmane.emacs.devel Subject: `fancy-splash-frame' query Date: Wed, 31 Jul 2002 01:45:47 +0100 Sender: emacs-devel-admin@gnu.org Message-ID: NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1028076090 16857 127.0.0.1 (31 Jul 2002 00:41:30 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 31 Jul 2002 00:41:30 +0000 (UTC) Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17ZhYP-0004Nm-00 for ; Wed, 31 Jul 2002 02:41:29 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17ZhqM-0005Iv-00 for ; Wed, 31 Jul 2002 03:00:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17ZhYY-00030w-00; Tue, 30 Jul 2002 20:41:38 -0400 Original-Received: from mail11.svr.pol.co.uk ([195.92.193.23]) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17ZhXm-0002u3-00 for ; Tue, 30 Jul 2002 20:40:50 -0400 Original-Received: from modem-812.charmeleon.dialup.pol.co.uk ([217.135.82.44] helo=bundalo.shootybangbang.com) by mail11.svr.pol.co.uk with esmtp (Exim 3.35 #1) id 17ZhXk-0007l6-00 for emacs-devel@gnu.org; Wed, 31 Jul 2002 01:40:48 +0100 Original-Received: from jpw by bundalo.shootybangbang.com with local (Exim 3.32 #1 (Debian)) id 17ZhcZ-000471-00 for ; Wed, 31 Jul 2002 01:45:47 +0100 Original-To: emacs-devel@gnu.org Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:6185 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:6185 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 * 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