]> git.jsancho.org Git - gacela.git/blob - emacs/emacs.conf
65645a522aba498526e71ffb11c68c8731df1f08
[gacela.git] / emacs / emacs.conf
1 ;;; Gacela configuration
2
3 (defun launch-gacela ()
4   (interactive)
5   (start-process "gacela" "gacela" "/home/jsancho/proyectos/gacela/trunk/src/gacela" "--dev"))
6
7 (defun send-to-gacela ()
8   (interactive)
9   (cond ((not (get-process "gacela"))
10          (launch-gacela)))
11   (cond ((use-region-p)
12          (process-send-region "gacela" (region-beginning) (region-end)))
13         (t
14          (process-send-region "gacela" (point-min-marker) (point-max-marker)))))
15
16 (define-key global-map [(ctrl x) (ctrl g)] 'send-to-gacela)
17
18 (define-key-after global-map [menu-bar tools gacela] (cons "Gacela" (make-sparse-keymap "hoot hoot")) 'games)
19 (define-key global-map [menu-bar tools gacela send] '("Send to Gacela" . send-to-gacela))
20 (define-key global-map [menu-bar tools gacela launch] '("Launch Gacela" . launch-gacela))
21