diff --git a/modules/home/users/msyds/emacs/lisp/syd/agda.el b/modules/home/users/msyds/emacs/lisp/syd/agda.el index d8a4f43..c76eea4 100755 --- a/modules/home/users/msyds/emacs/lisp/syd/agda.el +++ b/modules/home/users/msyds/emacs/lisp/syd/agda.el @@ -5,11 +5,18 @@ (defun syd-agda-locate-and-load () (interactive) - (let ((agda-mode-path (executable-find "agda-mode"))) - (load-file - (shell-command-to-string - (format "%s locate" agda-mode-path)))) - (setq agda2-program-name (executable-find "agda"))) + (if-let* ((agda-mode-path (executable-find "agda-mode")) + (agda-path (executable-find "agda"))) + (progn (load-file + (shell-command-to-string + (format "%s locate" agda-mode-path))) + (setq agda2-program-name agda-path)) + (when-let* ((mikan-path (executable-find "mikan"))) + (setq agda2-program-name mikan-path) + (load-file + (let ((coding-system-for-read 'utf-8)) + (shell-command-to-string + (format "%s --emacs-mode locate" mikan-path)))))))) (defface syd-agda2-default `((t :font ,(font-spec :family "IBM Plex Sans" :size 17)