emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fancy-splash-screens bug?


From: John Paul Wallington
Subject: Re: fancy-splash-screens bug?
Date: 02 Sep 2002 22:00:00 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

huug <huug.at.gmane=qWit8jRvyhVmR6Xm/address@hidden> 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




reply via email to

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