]> git.jsancho.org Git - gacela.git/blob - emacs/emacs_conf.lisp
296c467112269ff846cfabcb23715c44b8b96c2f
[gacela.git] / emacs / emacs_conf.lisp
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   (process-send-string "gacela" "\n"))
16
17 (define-key global-map [(ctrl x) (ctrl g)] 'send-to-gacela)
18
19 (define-key-after global-map [menu-bar tools gacela] (cons "Gacela" (make-sparse-keymap "hoot hoot")) 'games)
20 (define-key global-map [menu-bar tools gacela send] '("Send to Gacela" . send-to-gacela))
21 (define-key global-map [menu-bar tools gacela launch] '("Launch Gacela" . launch-gacela))
22