* Re: fancy-splash-screens bug?
[not found] <m2bs7ishjo.fsf@primate.xs4all.nl>
2002-09-02 0:01 ` fancy-splash-screens bug? Richard Stallman
@ 2002-09-02 21:00 ` John Paul Wallington
2002-09-04 14:20 ` Richard Stallman
1 sibling, 1 reply; 3+ messages in thread
From: John Paul Wallington @ 2002-09-02 21:00 UTC (permalink / raw)
Cc: emacs-devel
huug <huug.at.gmane=qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org> 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
^ permalink raw reply [flat|nested] 3+ messages in thread