From 06262fef1761d0f7018e5c2991853687b7f53be8 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 22 Aug 2018 03:52:53 +0200 Subject: [PATCH] Lazy-load agda2; more robust +agda-dir resolution --- modules/lang/agda/config.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/lang/agda/config.el b/modules/lang/agda/config.el index a294c30f7..6166727b9 100644 --- a/modules/lang/agda/config.el +++ b/modules/lang/agda/config.el @@ -1,7 +1,11 @@ ;;; lang/agda/config.el -*- lexical-binding: t; -*- -(defvar +agda-dir (string-remove-suffix "/agda2.el" (shell-command-to-string "agda-mode locate"))) +(defvar +agda-dir + (when (executable-find "adga-mode") + (file-name-directory (shell-command-to-string "agda-mode locate"))) + "TODO") + (def-package! agda2 - :load-path +agda-dir) - + :load-path +agda-dir + :defer t)