X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=emacs%2Femacs_conf.lisp;fp=emacs%2Femacs_conf.lisp;h=296c467112269ff846cfabcb23715c44b8b96c2f;hb=61cbb86694ce19f0d5dd44ccf847c9fbd61b8f7e;hp=0000000000000000000000000000000000000000;hpb=4e40519197d7b6e04e0d73204447bb9ed01ff3b1;p=gacela.git diff --git a/emacs/emacs_conf.lisp b/emacs/emacs_conf.lisp new file mode 100644 index 0000000..296c467 --- /dev/null +++ b/emacs/emacs_conf.lisp @@ -0,0 +1,22 @@ +;;; 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)))) + (process-send-string "gacela" "\n")) + +(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)) +