ruby1.9用のrcodetoolsの導入

rcodetoolsが1.9に対応したらしいです。*1
1.8と1.9を使い分けたいですね><。
そんなわけで、このような設定を加えました。

;(require 'rcodetools)の後あたりにでも
(defun make-cycle (l) ;循環リストを作成
  (let ((tmp l))
    (while (not (null (cdr tmp)))
      (setq tmp (cdr l)))
    (setcdr tmp l)))

(defun toggle-ruby-version () (interactive)
  (setq ruby-program-list (cdr ruby-program-list)
	ruby-program (car ruby-program-list))
  (ruby-config-edit ruby-program)
  (message (concat "present state: " ruby-program)))

(defvar ruby-program "ruby")
(defvar ruby-program-list '("ruby1.8" "ruby1.9"))
(make-cycle ruby-program-list)

(defun ruby-config-edit (ruby)
  (setq xmpfilter-command-name 
	(concat ruby-program " -S xmpfilter -S " ruby-program " --dev --fork --detect-rbtest")
	rct-doc-command-name 
	(concat ruby-program " -S rct-doc --dev --fork --detect-rbtest")
	rct-complete-command-name 
	(concat ruby-program " -S rct-complete --dev --fork --detect-rbtest")
	ruby-toggle-file-command-name 
	(concat ruby-program " -S ruby-toggle-file")
	rct-fork-command-name 
	(concat ruby-program " -S rct-fork"))
  )

(ruby-program-listの設定は環境によって違うかもしれません((絶対pathで設定する必要もあるかもしれません。)))
これでtoggle-ruby-versionを実行するたびにxmpfilterで使われるプログラムが1.8と1.9に切り替わります。

*1:rubykitchさんありがとうございます><