From 4f671c3acbc37174f9864b0b7425e8d194589730 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 25 Aug 2018 20:58:42 +0200 Subject: [PATCH] Fix stringp error caused by app/write's doctor Caused by langtool-langauge-tool-jar not being set (because defvar won't change a defined variable), and app/write/doctor.el uses it in a file-exists-p call, which throws the stringp error if given anything other than a string. --- modules/app/write/config.el | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/modules/app/write/config.el b/modules/app/write/config.el index 39c74b326..08a74ddff 100644 --- a/modules/app/write/config.el +++ b/modules/app/write/config.el @@ -36,14 +36,15 @@ langtool-correct-buffer) :init (setq langtool-default-language "en-US") :config - (defvar langtool-language-tool-jar - (cond (IS-MAC - (locate-file "libexec/languagetool-commandline.jar" - (doom-files-in "/usr/local/Cellar/languagetool" - :type 'dirs - :depth 1))) - (IS-LINUX - "/usr/share/java/languagetool/languagetool-commandline.jar")))) + (unless langtool-language-tool-jar + (setq langtool-language-tool-jar + (cond (IS-MAC + (locate-file "libexec/languagetool-commandline.jar" + (doom-files-in "/usr/local/Cellar/languagetool" + :type 'dirs + :depth 1))) + (IS-LINUX + "/usr/share/java/languagetool/languagetool-commandline.jar"))))) ;; `synosaurus'