kobapan@wiLiki
Login
Gauche

Gauche:Gaucheのインストール

目次

インストール

% wget http://prdownloads.sourceforge.net/gauche/Gauche-0.9.9.tgz
% tar -zxf Gauche-0.9.9.tgz
% cd Gauche-0.9.9
% ./configure --prefix=$HOME/local --with-local=$HOME/local --with-slib=$HOME/local/lib/slib
% make
% make test
% make install

prefix はインストールディレクトリを指定する際に必要。

with-local は mbed のような外部ライブラリを使う際に必要。

--with-local=PATH:PATH2:...

This addts PATH/include, PATH2/include, …​ to the include paths, and PATH/lib, PATH2/lib, …​ to the library search paths.

with-slib はSLIB を使う際に必要。

The configure script tries to find where SLIB is installed. It looks for some typical directories like /usr/local/slib or /usr/share/slib. If you installed your SLIB in some non-standard location, you can tell it to the configure script as follows:

--with-slib=PATH

emacsの設定

(run-scheme "~/local/bin/gosh -i")

単に(run-scheme "gosh -i")とすると、/usr/local/bin/goshを見に行くので、ホームにインストールした場合は注意。

(add-to-list 'auto-mode-alist '("\\.\\(cgi\\|scm\\)\\'" . gauche-mode))
(autoload 'gauche-mode "gauche-mode" "Major mode for Scheme." t)
(autoload 'run-scheme "gauche-mode" "Run an inferior Scheme process." t)
(defun scheme-other-window ()
  "Run scheme on other window"
  (interactive)
  (switch-to-buffer-other-window
   (get-buffer-create "*scheme*"))
  (modify-coding-system-alist 'process "gosh" '(utf-8 . utf-8))
  (run-scheme "~/local/bin/gosh -i")
  (unless auto-complete-mode
    (auto-complete-mode)))
(add-hook 'scheme-mode-hook
   '(lambda ()
      (set-default 'truncate-lines nil)
      (define-key scheme-mode-map [(C-tab)] 'lisp-complete-symbol)
      (define-key scheme-mode-map "\C-cs" 'scheme-other-window)))

参考

Debian
Emacs
Firefox
Gauche
JavaScript
Linux
Scheme
org-mode/latex

More ...