1 ;;; Gacela configuration
3 (defun launch-gacela ()
5 (start-process "gacela" "gacela" "/home/jsancho/proyectos/gacela/trunk/src/gacela" "--dev"))
7 (defun send-to-gacela ()
9 (cond ((not (get-process "gacela"))
11 (process-send-string "gacela" "(begin ")
13 (process-send-region "gacela" (region-beginning) (region-end)))
15 (process-send-string "gacela" "(run-game) (hide-all-mobs)")
16 (process-send-region "gacela" (point-min-marker) (point-max-marker))))
17 (process-send-string "gacela" "\n)\n"))
19 (define-key global-map [(ctrl x) (ctrl g)] 'send-to-gacela)
21 (define-key-after global-map [menu-bar tools gacela] (cons "Gacela" (make-sparse-keymap "hoot hoot")) 'games)
22 (define-key global-map [menu-bar tools gacela send] '("Send to Gacela" . send-to-gacela))
23 (define-key global-map [menu-bar tools gacela launch] '("Launch Gacela" . launch-gacela))