Add define-project-type macro

This commit is contained in:
Henrik Lissner
2016-04-16 21:36:24 -04:00
parent dd3d51e750
commit 988f09365b
8 changed files with 142 additions and 128 deletions

View File

@@ -7,18 +7,11 @@
;; LaunchBar: https://www.obdev.at/products/launchbar
;;
(define-minor-mode lb6-mode
"Launchbar development mode."
:init-value nil
:lighter " lb6"
(add-yas-minor-mode! 'lb6-mode))
(define-builder! lb6-mode narf-lb6-reload)
(associate! lb6-mode :match "\\.lb\\(action\\|ext\\)/.+$")
(defun narf-lb6-reload ()
(interactive)
(let ((dir (f-traverse-upwards (lambda (f) (string-suffix-p ".lbaction" f)))))
(shell-command (format "open '%s'" dir))))
(define-project-type! lb6 "lb6"
:match "\\.lb\\(action\\|ext\\)/.+$"
:build (lambda ()
(awhen (f-traverse-upwards (lambda (f) (f-ext? f "lbaction")))
(shell-command (format "open '%s'" it)))))
;;