From dbbdca7d5d5e8079b96f7f26909b75c13af6016c Mon Sep 17 00:00:00 2001 From: Eivind Fonn Date: Wed, 17 Aug 2016 20:20:20 +0200 Subject: [PATCH] Fix agda indentation and README --- layers/+lang/agda/README.org | 14 ++++++++++---- layers/+lang/agda/config.el | 7 ++++--- layers/+lang/agda/packages.el | 17 ++++++++++------- 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/layers/+lang/agda/README.org b/layers/+lang/agda/README.org index a03ca7842..4e54814a2 100644 --- a/layers/+lang/agda/README.org +++ b/layers/+lang/agda/README.org @@ -34,10 +34,16 @@ Then check that =agda= is available on your =$PATH= and seen by Emacs. For information about setting up =$PATH=, check out the corresponding section in the FAQ (~SPC h SPC $PATH RET~). -By default the =agda-mode= executable bundled with most agda installations -is used to locate the agda-mode package. If you don't have it and want to use -a local agda-mode package, you can customize the layer variable =agda-mode-path= -to your needs. +By default the =agda-mode= executable bundled with most agda installations is +used to locate the agda-mode package. If you don't have it and want to use a +local agda-mode package, you can customize the layer variable =agda-mode-path= +to your needs. Set it to =nil= if =agda2.el= is already discoverable in Emacs’ +load path, otherwise set it to the path at which =agda2.el= can be found. For +example, + +#+BEGIN_SRC emacs-lisp + (agda2 :variables agda-mode-path "/some/path/to/agda2.el") +#+END_SRC * Key bindings The key bindings of this layer don't follow the Spacemacs conventions, diff --git a/layers/+lang/agda/config.el b/layers/+lang/agda/config.el index 146620985..9f74d0366 100644 --- a/layers/+lang/agda/config.el +++ b/layers/+lang/agda/config.el @@ -10,6 +10,7 @@ ;;; License: GPLv3 (defvar agda-mode-path 'use-helper - "Indicates the location of the agda-mode package. -If `nil', it is assumed to be already available by Emacs. -If `'use-helper', the `agda-mode' executable is used to find its location.") + "Indicates the location of the agda-mode package (the file +`agda2.el') If `nil', it is assumed to be already available by +Emacs. If `use-helper', the `agda-mode' executable is used to +find its location.") diff --git a/layers/+lang/agda/packages.el b/layers/+lang/agda/packages.el index 89e94ffcb..a09467b11 100644 --- a/layers/+lang/agda/packages.el +++ b/layers/+lang/agda/packages.el @@ -13,13 +13,16 @@ '((agda :location local))) (defun agda/init-agda () - (if (and (eq agda-mode-path 'use-helper) (not (executable-find "agda-mode"))) - (spacemacs-buffer/warning - (concat "Couldn't find `agda-mode', make sure it is " - "available in your PATH or check the installation " - "instructions in the README file.")) + (if (and (eq 'use-helper agda-mode-path) + (not (executable-find "agda-mode"))) + (spacemacs-buffer/warning + (concat "Couldn't find `agda-mode', make sure it is " + "available in your PATH or check the installation " + "instructions in the README file.")) - (when (eq agda-mode-path 'use-helper) (setq agda-mode-path (let ((coding-system-for-read 'utf-8)) (shell-command-to-string "agda-mode locate")))) + (when (eq 'use-helper agda-mode-path) + (setq agda-mode-path (let ((coding-system-for-read 'utf-8)) + (shell-command-to-string "agda-mode locate")))) (use-package agda2-mode :defer t @@ -76,4 +79,4 @@ (with-eval-after-load 'golden-ratio (add-to-list 'golden-ratio-exclude-buffer-names - "*Agda information*")))))) + "*Agda information*"))))))