diff options
Diffstat (limited to 'custom/jao-custom-programming.el')
-rw-r--r-- | custom/jao-custom-programming.el | 45 |
1 files changed, 25 insertions, 20 deletions
diff --git a/custom/jao-custom-programming.el b/custom/jao-custom-programming.el index 4028f3d..b88c43c 100644 --- a/custom/jao-custom-programming.el +++ b/custom/jao-custom-programming.el @@ -239,32 +239,37 @@ ;;;; Clojure (use-package clojure-mode :ensure t + :hook (clojure-mode . jao-clojure--fix-things) :config (defun jao-clojure--fix-things () (setq-local completion-styles '(basic partial-completion emacs22)) (eldoc-mode 1) (setq mode-name "λ")) - :hook (clojure-mode . jao-clojure--fix-things)) -(defun jao-cider-test-ns (ns) - (let ((parts (string-split ns "\\."))) - (if (string= "test" (cadr parts)) - ns - (mapconcat #'identity (cons (car parts) (cons "test" (cdr parts))) ".")))) - -(defun jao-kaocha-file-name () - (let* ((filename (match-string 2)) - (path (replace-regexp-in-string "\\." "/" (match-string 1)))) - (substring-no-properties (concat "test/" path filename)))) - -(defconst jao-kaocha-compilation-error - '(kaocha-error "^FAIL in \\(.+\\.\\)[^ ]+ (\\([^:]+\\.clj[cs]?\\):\\([0-9]+\\))" - jao-kaocha-file-name 3)) - -(use-package compile - :config - (add-to-list 'compilation-error-regexp-alist-alist - jao-kaocha-compilation-error)) + (defun jao-cider-test-ns (ns) + (let ((parts (string-split ns "\\."))) + (if (string= "test" (cadr parts)) + ns + (mapconcat #'identity + (cons (car parts) (cons "test" (cdr parts))) ".")))) + + (defun jao-kaocha-file-name () + (let* ((filename (match-string 2)) + (path (replace-regexp-in-string "\\." "/" (match-string 1)))) + (substring-no-properties (concat "test/" path filename)))) + + (defconst jao-kaocha-compilation-error + '(kaocha-error + "^FAIL in \\(.+\\.\\)[^ ]+ (\\([^:]+\\.clj[cs]?\\):\\([0-9]+\\))" + jao-kaocha-file-name 3)) + + (use-package compile + :config + (add-to-list 'compilation-error-regexp-alist-alist + jao-kaocha-compilation-error))) + +(use-package jao-clojure + :bind (:map clojure-mode-map (("C-c o" . jao-clojure-other-file)))) (use-package cider :ensure t |