aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2019-09-26 18:27:03 +0200
committerLars Ingebrigtsen2019-09-26 18:27:09 +0200
commitb94f01a6165908d9f8b0d48653fdc8d75be4dd08 (patch)
tree9ab195e68ca7e9d5e40e33d76751ba41b9ed02ec
parent814cab3b4d89066dbd9a7aaad7d98c382a5a3485 (diff)
downloademacs-b94f01a6165908d9f8b0d48653fdc8d75be4dd08.tar.gz
emacs-b94f01a6165908d9f8b0d48653fdc8d75be4dd08.zip
Fix error in display-startup-screen
* lisp/startup.el (use-fancy-splash-screens-p): Fix error in display-startup-screen if create-image fails (bug#22072).
-rw-r--r--lisp/startup.el20
1 files changed, 10 insertions, 10 deletions
diff --git a/lisp/startup.el b/lisp/startup.el
index 4078f23f3a8..6e2094d678c 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1974,16 +1974,16 @@ we put it on this frame."
1974 (image-type-available-p 'pbm))) 1974 (image-type-available-p 'pbm)))
1975 (let ((frame (fancy-splash-frame))) 1975 (let ((frame (fancy-splash-frame)))
1976 (when frame 1976 (when frame
1977 (let* ((img (create-image (fancy-splash-image-file))) 1977 (let ((img (create-image (fancy-splash-image-file))))
1978 (image-height (and img (cdr (image-size img nil frame)))) 1978 (when img
1979 ;; We test frame-height and not window-height so that, 1979 (let ((image-height (cdr (image-size img nil frame)))
1980 ;; if the frame is split by displaying a warning, that 1980 ;; We test frame-height and not window-height so that,
1981 ;; doesn't cause the normal splash screen to be used. 1981 ;; if the frame is split by displaying a warning, that
1982 ;; We subtract 2 from frame-height to account for the 1982 ;; doesn't cause the normal splash screen to be used.
1983 ;; echo area and the mode line. 1983 ;; We subtract 2 from frame-height to account for the
1984 (frame-height (- (frame-height frame) 2))) 1984 ;; echo area and the mode line.
1985 (> frame-height (+ image-height 19))))))) 1985 (frame-height (- (frame-height frame) 2)))
1986 1986 (> frame-height (+ image-height 19)))))))))
1987 1987
1988(defun normal-splash-screen (&optional startup concise) 1988(defun normal-splash-screen (&optional startup concise)
1989 "Display non-graphic splash screen. 1989 "Display non-graphic splash screen.