1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-18 18:05:07 +00:00

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).
This commit is contained in:
Lars Ingebrigtsen 2019-09-26 18:27:03 +02:00
parent 814cab3b4d
commit b94f01a616

View File

@ -1974,16 +1974,16 @@ we put it on this frame."
(image-type-available-p 'pbm)))
(let ((frame (fancy-splash-frame)))
(when frame
(let* ((img (create-image (fancy-splash-image-file)))
(image-height (and img (cdr (image-size img nil frame))))
;; We test frame-height and not window-height so that,
;; if the frame is split by displaying a warning, that
;; doesn't cause the normal splash screen to be used.
;; We subtract 2 from frame-height to account for the
;; echo area and the mode line.
(frame-height (- (frame-height frame) 2)))
(> frame-height (+ image-height 19)))))))
(let ((img (create-image (fancy-splash-image-file))))
(when img
(let ((image-height (cdr (image-size img nil frame)))
;; We test frame-height and not window-height so that,
;; if the frame is split by displaying a warning, that
;; doesn't cause the normal splash screen to be used.
;; We subtract 2 from frame-height to account for the
;; echo area and the mode line.
(frame-height (- (frame-height frame) 2)))
(> frame-height (+ image-height 19)))))))))
(defun normal-splash-screen (&optional startup concise)
"Display non-graphic splash screen.