summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClément Lassieur <clement.lassieur@parrot.com>2018-02-01 10:35:22 +0100
committerClément Lassieur <clement.lassieur@parrot.com>2018-02-01 11:09:01 +0100
commitd724f83b573142230a8d313d7ffb44dd5020de05 (patch)
tree7866beda3ce73cd213b19bbd0a983fd01f783d7a
parent2600dffed55a8b4b9ba3a3dbef21479b4c29f305 (diff)
downloadparrot-d724f83b573142230a8d313d7ffb44dd5020de05.tar.gz
alchemy: generate popups on user side
-rw-r--r--parrot-alchemy.el23
1 files changed, 12 insertions, 11 deletions
diff --git a/parrot-alchemy.el b/parrot-alchemy.el
index ffd6586..6aeb111 100644
--- a/parrot-alchemy.el
+++ b/parrot-alchemy.el
@@ -1,13 +1,14 @@
;; example of configuration:
;;
-;; (setq alchemy-popups
-;; '(("delos-v3" "delos-v3" "~/.minidrones" ?d)
-;; ("jpsumo-evo" "jpsumo-evo" "~/.jpsumo-minidrones" ?j)
-;; ("powerup" "powerup-dev" "~/.powerup-minidrones" ?p)
-;; ("rsedu-v3" "delos-v3" "~/.rsedu-minidrones" ?r)
-;; ("chimera" "ardrone3-chimera" "~/.ardrone" ?c)
-;; ("evinrude" "evinrude" "~/.evinrude" ?e)
-;; ("bebop" "ardrone3-milos" "~/.ardrone" ?b)))
+;; (with-eval-after-load 'parrot-alchemy
+;; (alchemy-generate-popups
+;; (("delos-v3" "delos-v3" "~/.minidrones" ?d)
+;; ("jpsumo-evo" "jpsumo-evo" "~/.jpsumo-minidrones" ?j)
+;; ("powerup" "powerup-dev" "~/.powerup-minidrones" ?p)
+;; ("rsedu-v3" "delos-v3" "~/.rsedu-minidrones" ?r)
+;; ("chimera" "ardrone3-chimera" "~/.ardrone" ?c)
+;; ("evinrude" "evinrude" "~/.evinrude" ?e)
+;; ("bebop" "ardrone3-milos" "~/.ardrone" ?b))))
(require 'subr-x) ; string-join
@@ -199,10 +200,11 @@
:actions ',(alchemy-specific-actions name product path))
(magit-define-popup-action 'alchemy-popup ,key ,name ',popup-name))))
-(defmacro alchemy-generate-popups ()
+;;;###autoload
+(defmacro alchemy-generate-popups (popups)
(cons 'progn (apply 'append (mapcar (lambda (popup)
(apply 'alchemy-popup-code popup))
- alchemy-popups))))
+ popups))))
(setq alchemy-common-options
'((?j "jobs" "-j "))
@@ -234,7 +236,6 @@
(?S "sync -d" (lambda () (interactive) (alchemy-sync-d ,name ,path)))))
(require 'magit-popup)
-(alchemy-generate-popups)
;;;###autoload (autoload 'alchemy-popup "parrot-alchemy" "" t nil)
(magit-define-popup alchemy-popup