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: Re: fancy-splash-screens bug? Date: 02 Sep 2002 22:00:00 +0100 Sender: emacs-devel-admin@gnu.org Message-ID: <874rd8w1in.fsf@bundalo.shootybangbang.com> References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1031000175 20071 127.0.0.1 (2 Sep 2002 20:56:15 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 2 Sep 2002 20:56:15 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17lyF2-0005DQ-00 for ; Mon, 02 Sep 2002 22:56:12 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17lynQ-0000jL-00 for ; Mon, 02 Sep 2002 23:31:44 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17lyGY-0008VK-00; Mon, 02 Sep 2002 16:57:46 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17lyEE-0008Q7-00 for emacs-devel@gnu.org; Mon, 02 Sep 2002 16:55:22 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17lyEC-0008Ou-00 for emacs-devel@gnu.org; Mon, 02 Sep 2002 16:55:22 -0400 Original-Received: from cmailm3.svr.pol.co.uk ([195.92.193.19]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17lyEB-0008OJ-00 for emacs-devel@gnu.org; Mon, 02 Sep 2002 16:55:19 -0400 Original-Received: from modem-56.charmander.dialup.pol.co.uk ([217.135.74.56] helo=bundalo.shootybangbang.com) by cmailm3.svr.pol.co.uk with esmtp (Exim 3.35 #1) id 17lyE8-0005eo-00; Mon, 02 Sep 2002 21:55:17 +0100 Original-Received: from jpw by bundalo.shootybangbang.com with local (Exim 3.32 #1 (Debian)) id 17lyIi-0007iz-00; Mon, 02 Sep 2002 22:00:00 +0100 Original-To: huug In-Reply-To: Original-Lines: 77 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 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:7344 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:7344 huug wrote: > Maybe there's something with my machine (Mandrake Linux Cooker past > 9.0 beta4) but for a while I've been getting this error on launch. > > emacs-version is GNU Emacs 21.3.50.3 (i686-pc-linux-gnu, X toolkit) of > 2002-08-31 on primate.xs4all.nl (checked out just after 17:00) [...] > fancy-splash-screens: Wrong type argument: framep, nil Presently, `fancy-splash-screens-p' may return t when `fancy-splash-frame' returns nil, because its `frame-selected-window' call with a nil optional FRAME argument will default to the currently selected frame. We could fix that like so: *** /build-emacs/emacs/lisp/startup.el~ Sun Sep 1 04:14:28 2002 --- /build-emacs/emacs/lisp/startup.el Mon Sep 2 21:42:44 2002 *************** *** 1322,1335 **** (when (or (and (display-color-p) (image-type-available-p 'xpm)) (image-type-available-p 'pbm)) ! (let* ((frame (fancy-splash-frame)) ! (img (create-image (or fancy-splash-image ! (if (and (display-color-p) ! (image-type-available-p 'xpm)) ! "splash.xpm" "splash.pbm")))) ! (image-height (and img (cdr (image-size img)))) ! (window-height (1- (window-height (frame-selected-window frame))))) ! (> window-height (+ image-height 19))))) (defun normal-splash-screen () --- 1323,1337 ---- (when (or (and (display-color-p) (image-type-available-p 'xpm)) (image-type-available-p 'pbm)) ! (let ((frame (fancy-splash-frame))) ! (when frame ! (let* ((img (create-image (or fancy-splash-image ! (if (and (display-color-p) ! (image-type-available-p 'xpm)) ! "splash.xpm" "splash.pbm")))) ! (image-height (and img (cdr (image-size img)))) ! (window-height (1- (window-height (frame-selected-window frame))))) ! (> window-height (+ image-height 19))))))) (defun normal-splash-screen () Incidentally, if you try the following change to 'fancy-splash-screens' does that avoid the error? Do you get a sane fancy splash screen? *** /build-emacs/emacs/lisp/startup.el~ Sun Sep 1 04:14:28 2002 --- /build-emacs/emacs/lisp/startup.el Mon Sep 2 21:23:46 2002 *************** *** 1276,1282 **** (frame (fancy-splash-frame)) timer) (save-selected-window ! (select-frame frame) (switch-to-buffer "GNU Emacs") (setq tab-width 20) (setq splash-buffer (current-buffer)) --- 1276,1283 ---- (frame (fancy-splash-frame)) timer) (save-selected-window ! (if frame ! (select-frame frame)) (switch-to-buffer "GNU Emacs") (setq tab-width 20) (setq splash-buffer (current-buffer)) -- John Paul Wallington