From 2153d8ec205bd1b4a6abdb5ab015bbcece189372 Mon Sep 17 00:00:00 2001 From: conao3 Date: Tue, 11 Feb 2020 04:43:00 +0900 Subject: [PATCH] separate error message --- smog.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/smog.el b/smog.el index 1bbfeef..dbbfc9d 100644 --- a/smog.el +++ b/smog.el @@ -130,9 +130,12 @@ Further details can be found in the =style(1)= man page.\n" (defun smog--style-installed-p () "Is the style command installed?" - (eq 0 (condition-case nil - (call-process "style") - (error (message "The program 'style' isn't installed or can't be found."))))) + (let ((program "style")) + (unless (executable-find program) + (message "The program 'style' isn't installed or can't be found.")) + (eq 0 (condition-case nil + (call-process program) + (error (message "The program 'style' test run exit abnormally.")))))) ;;;###autoload (defun smog-check-buffer ()