]> git.jsancho.org Git - gacela.git/blobdiff - emacs/emacs.conf
(no commit message)
[gacela.git] / emacs / emacs.conf
diff --git a/emacs/emacs.conf b/emacs/emacs.conf
new file mode 100644 (file)
index 0000000..65645a5
--- /dev/null
@@ -0,0 +1,21 @@
+;;; Gacela configuration
+
+(defun launch-gacela ()
+  (interactive)
+  (start-process "gacela" "gacela" "/home/jsancho/proyectos/gacela/trunk/src/gacela" "--dev"))
+
+(defun send-to-gacela ()
+  (interactive)
+  (cond ((not (get-process "gacela"))
+        (launch-gacela)))
+  (cond ((use-region-p)
+        (process-send-region "gacela" (region-beginning) (region-end)))
+       (t
+        (process-send-region "gacela" (point-min-marker) (point-max-marker)))))
+
+(define-key global-map [(ctrl x) (ctrl g)] 'send-to-gacela)
+
+(define-key-after global-map [menu-bar tools gacela] (cons "Gacela" (make-sparse-keymap "hoot hoot")) 'games)
+(define-key global-map [menu-bar tools gacela send] '("Send to Gacela" . send-to-gacela))
+(define-key global-map [menu-bar tools gacela launch] '("Launch Gacela" . launch-gacela))
+