]> git.jsancho.org Git - gacela.git/blob - emacs/emacs_conf.lisp
Merge branch 'release/0.6'
[gacela.git] / emacs / emacs_conf.lisp
1 ;;; Guile configuration
2
3 (defun launch-guile ()
4   (interactive)
5   (let ((process-connection-type nil))
6     (start-process "guile" "guile" "/usr/bin/guile")))
7
8 (defun send-to-guile ()
9   (interactive)
10   (cond ((not (get-process "guile"))
11          (launch-guile)))
12
13   (process-send-string
14    "guile"
15    (replace-regexp-in-string
16     "\t" " "
17     (cond ((use-region-p)
18            (buffer-substring-no-properties (region-beginning) (region-end)))
19           (t
20            (buffer-substring-no-properties (point-min-marker) (point-max-marker)))))))
21
22
23 (define-key global-map [(ctrl x) (ctrl g)] 'send-to-guile)
24
25 (define-key-after global-map [menu-bar tools guile] (cons "Guile" (make-sparse-keymap "hoot hoot")) 'games)
26 (define-key global-map [menu-bar tools guile send] '("Send to Guile" . send-to-guile))
27 (define-key global-map [menu-bar tools guile launch] '("Launch Guile" . launch-guile))
28