なぜか SBCL + SLIME が動かないので Clozure + SLIME に浮気してみた。コンパイルとロードが速い!!
で、ひとつ気になったのが SBCL のように require で asdf:*central-registry* にあるライブラリをロードしてくれないこと。
以前、MCL でなんかしたなぁ、というのを思い出しつつ ccl::*module-provider-functions* に pushnew してみた。
~/ccl-init.lisp
;;;; -*- lisp -*-
;;; 最適化
(declaim (optimize (debug 3) (safety 3) (speed 0) (space 0)
                   (compilation-speed 3)))
;;(declaim (optimize (debug 0) (safety 0) (speed 3) (space 0)
;;                   (compilation-speed 0)))
;;; 文字コード
(setf ccl:*default-external-format*
      (ccl:make-external-format :character-encoding :utf-8
                                :line-termination :unix)
      ccl:*default-file-character-encoding* :utf-8
      ccl:*default-socket-character-encoding* :utf-8)
;;; asdf
(require :asdf)
;; ~/letter/lib 以下の asd を登録する。
(loop for path in (directory (translate-logical-pathname
                                       "home:letter;lisp;lib;**;*.asd"))
      do (let ((pd (pathname-directory path)))
           (unless (member "_darcs" pd :test #'equal)
             (pushnew (make-pathname :directory pd)
                      asdf:*central-registry*
                      :test #'equal))))
;; clbuild
(pushnew (translate-logical-pathname "home:letter;lisp;clbuild;systems;")
         asdf:*central-registry*)
;; require で asdf:oos する
(defun asdf-module-provider-function (module)
  (when (asdf:find-system module nil)
    (asdf:oos 'asdf:load-op module)
    t))
(pushnew 'asdf-module-provider-function
         ccl::*module-provider-functions*)