cond
場合分け
(cond ((numberp x) x) ; x が数値なら
((stringp x) x) ; x が文字なら
((bufferp x) ; x がバッファなら
(setq temporary-hack x) ; 実行文には複数の文も書ける
(buffer-name x)) ;
((symbolp x) (symbol-value x)) ) ; シンボルなら
どれにも一致しなかった時に実行するものは t (「常に真」を使う)
(cond ((eq a 'hack) 'foo)
(t "default"))
(cond
((string-match "2" mule-version)
(progn
(load-file ("~makoto/mule/lisp/env/mule-2.el"))
(load-file ("~makoto/mule/lisp/env/mime-mule2-setup.el"))))
((string-match "3" mule-version)
(load-file ("~makoto/mule/lisp/env/mule-3.el"))))
|