Small code share to keep up to date and download grammalecte automatically (normally it works for me)
(use-package flycheck
:config
(global-flycheck-mode t) ;;activate flycheck-mode to work the dowload
)
(use-package flycheck-grammalecte
:after flycheck
;; the configuration go here
(flycheck-grammalecte-setup)
;; try and install
(unless (fboundp 'grammalecte--version)
(grammalecte-download-grammalecte))
;; update
(let ((local-version (grammalecte--version))
(upstream-version (grammalecte--upstream-version)))
(when (stringp upstream-version)
(if (stringp local-version)
;; It seems we have a local version of grammalecte.
;; Compare it with upstream
(when (and (string-version-lessp local-version upstream-version)
(or grammalecte-download-without-asking
(yes-or-no-p
"[Grammalecte] Grammalecte is out of date. Download it NOW?")))
(grammalecte-download-grammalecte upstream-version))
;; It seems there is no currently downloaded Grammalecte
;; package. Force install it, as nothing will work without it.
(grammalecte-download-grammalecte upstream-version))))
)
Test and give me a feedback ^^
Small code share to keep up to date and download grammalecte automatically (normally it works for me)
Test and give me a feedback ^^