Hatena::Groupsubtech

subpop

2007-11-08

gca.el --- utilities for writing Gauche codes

22:36 |  gca.el --- utilities for writing Gauche codes - subpop を含むブックマーク はてなブックマーク -  gca.el --- utilities for writing Gauche codes - subpop  gca.el --- utilities for writing Gauche codes - subpop のブックマークコメント

gca.el consists of several utilities to enable us to efficiently write Scheme (precisely saying, Gauche, a Scheme interpreter) codes with Emacs. Today, I got to know it via higepon's post, went straight to try it, and was really astnished by its great usefulness.

Here's my configurations about gca.el in .emacs.

;; gca.el
;; http://practical-scheme.net/wiliki/wiliki.cgi?GaucheFest%3akoguro

(require 'gca)

;; C-c C-u: insert `(use module)' expression.
(define-key scheme-mode-map "\C-c\C-u" 'gca-insert-use)

(let ((m (make-sparse-keymap)))

;; C-c C-d h: search docs for a symbol at point.
(define-key m "h" 'gca-show-info)

;; C-c C-d i: toggle `auto-info-mode'.
(define-key m "i" 'auto-info-mode)
(define-key scheme-mode-map "\C-c\C-d" m))

;; C-c C-,: show next result, if multiple candidates found after
;;          searching.
(define-key scheme-mode-map [(control c) (control ,)] 'gca-info-next)

;; C-.: complete a symbol showing candidates in other buffer.
(define-key scheme-mode-map [(control .)] 'gca-completion-current-word)

;; C-c C-.: insert code snippets from a template file
;;          (I haven't fully understood this feature yet, though)
(define-key scheme-mode-map [(control c) (control .)] 'gca-insert-template)
(define-key c-mode-map [(control c) (control .)] 'gca-insert-template)

;; C-c C-t: insert a test case like `(test* "test name" expected input)'
;;          from the results in run-scheme buffer.
(define-key scheme-mode-map "\C-c\C-t" 'gca-make-test)

;; C-c C-h: show history of run-scheme buffer.
(define-key scheme-mode-map "\C-c\C-h" 'gca-show-history)

;; set `scheme-program-nam' to load tgosh.scm
(setq scheme-program-name "gosh ~/.emacs.d/gauche/tgosh.scm")