lang/nim: fix blank nimsuggest-path stringp error
This commit is contained in:
parent
68e2b814e7
commit
fcf2a26329
1 changed files with 3 additions and 1 deletions
|
@ -4,7 +4,9 @@
|
||||||
(defun +nim|init-nimsuggest-mode ()
|
(defun +nim|init-nimsuggest-mode ()
|
||||||
"Conditionally load `nimsuggest-mode', instead of clumsily erroring out if
|
"Conditionally load `nimsuggest-mode', instead of clumsily erroring out if
|
||||||
nimsuggest isn't installed."
|
nimsuggest isn't installed."
|
||||||
(when (file-executable-p nimsuggest-path)
|
(unless (stringp nimsuggest-path)
|
||||||
|
(setq nimsuggest-path (executable-find "nimsuggest")))
|
||||||
|
(when (and nimsuggest-path (file-executable-p nimsuggest-path))
|
||||||
(nimsuggest-mode)))
|
(nimsuggest-mode)))
|
||||||
(add-hook 'nim-mode-hook #'+nim|init-nimsuggest-mode)
|
(add-hook 'nim-mode-hook #'+nim|init-nimsuggest-mode)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue