fix(emacs/load-lean.el): proceed even if logo image is not created

On OSX + emacs-24.5, pgm file is not supported in the terminal.
This patch ignores the error and does not show the Lean logo if it fails to create one.
This commit is contained in:
Soonho Kong 2015-12-18 14:28:54 -05:00
parent a7d1625765
commit c5223d2d19

View file

@ -10,7 +10,10 @@
(setq lean-emacs-dependencies-path (format "%s/dependencies" lean-emacs-path))
(setq lean-logo (create-image (format "%s/lean.pgm" lean-emacs-path)))
(setq lean-logo
(condition-case nil
(create-image (format "%s/lean.pgm" lean-emacs-path))
(error nil)))
(setq lean-required-packages '(company dash dash-functional f fill-column-indicator flycheck let-alist lua-mode mmm-mode s))
(setq load-path
@ -32,7 +35,7 @@
(erase-buffer)
(insert "\n\n")
(insert " ")
(insert-image lean-logo)
(when lean-logo (insert-image lean-logo))
(setq cpoint (1+ (point)))
(insert "\n")
(insert "\n\nPlease check our website periodically for news of later versions")