doctor: log! => section!

This commit is contained in:
Henrik Lissner 2017-12-20 19:51:33 -05:00
parent a2bbf2fbee
commit bd1a4e31f6
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -75,7 +75,7 @@
(defmacro error! (&rest args) `(message (color 1 (color 31 ,@args)))) (defmacro error! (&rest args) `(message (color 1 (color 31 ,@args))))
(defmacro warn! (&rest args) `(message (color 1 (color 33 ,@args)))) (defmacro warn! (&rest args) `(message (color 1 (color 33 ,@args))))
(defmacro success! (&rest args) `(message (color 1 (color 32 ,@args)))) (defmacro success! (&rest args) `(message (color 1 (color 32 ,@args))))
(defmacro log! (&rest args) `(if doom-debug-mode (message (color 34 ,@args)))) (defmacro section! (&rest args) `(message (color 34 ,@args)))
(defmacro explain! (&rest args) `(message (indented 2 (autofill ,@args)))) (defmacro explain! (&rest args) `(message (indented 2 (autofill ,@args))))
;;; Polyfills ;;; Polyfills
@ -120,7 +120,7 @@
;; --- is emacs set up properly? ------------------------------ ;; --- is emacs set up properly? ------------------------------
(log! "test-emacs") (section! "test-emacs")
(check! (version< emacs-version "25.1") (check! (version< emacs-version "25.1")
(error! "Important: Emacs %s detected [%s]" emacs-version (executable-find "emacs")) (error! "Important: Emacs %s detected [%s]" emacs-version (executable-find "emacs"))
(explain! (explain!
@ -133,13 +133,13 @@
;; --- is the environment set up properly? -------------------- ;; --- is the environment set up properly? --------------------
;; windows? windows ;; windows? windows
(log! "test-windows") (section! "test-windows")
(check! (memq system-type '(windows-nt ms-dos cygwin)) (check! (memq system-type '(windows-nt ms-dos cygwin))
(warn! "Warning: Windows detected") (warn! "Warning: Windows detected")
(explain! "DOOM was designed for MacOS and Linux. Expect a bumpy ride!")) (explain! "DOOM was designed for MacOS and Linux. Expect a bumpy ride!"))
;; are all default fonts present ;; are all default fonts present
(log! "test-fonts") (section! "test-fonts")
(if (not (fboundp 'find-font)) (if (not (fboundp 'find-font))
(progn (progn
(warn! "Warning: unable to detect font") (warn! "Warning: unable to detect font")
@ -162,7 +162,7 @@
"case, ignore this warning.")))))) "case, ignore this warning."))))))
;; gnutls-cli & openssl ;; gnutls-cli & openssl
(log! "test-gnutls") (section! "test-gnutls")
(cond ((executable-find "gnutls-cli")) (cond ((executable-find "gnutls-cli"))
((executable-find "openssl") ((executable-find "openssl")
(let* ((output (shell-command-to-string "openssl ciphers -v")) (let* ((output (shell-command-to-string "openssl ciphers -v"))
@ -198,7 +198,7 @@
"network, provider, government, neckbearded mother-in-laws, geeky roommates, " "network, provider, government, neckbearded mother-in-laws, geeky roommates, "
"or just about anyone who knows more about computers than you do!")))) "or just about anyone who knows more about computers than you do!"))))
(log! "test-tls") (section! "test-tls")
(cond ((not (string-match-p "\\_<GNUTLS\\_>" system-configuration-features)) (cond ((not (string-match-p "\\_<GNUTLS\\_>" system-configuration-features))
(warn! "Warning: You didn't install Emacs with gnutls support") (warn! "Warning: You didn't install Emacs with gnutls support")
(explain! (explain!
@ -253,7 +253,7 @@
(error! "Nope!"))) (error! "Nope!")))
;; bsd vs gnu tar ;; bsd vs gnu tar
(log! "test-tar") (section! "test-tar")
(let ((tar-bin (or (executable-find "gtar") (let ((tar-bin (or (executable-find "gtar")
(executable-find "tar")))) (executable-find "tar"))))
(if tar-bin (if tar-bin