試す(評価する)
Lisp Interaction
C-x b *scratch*
とすると、(Lisp Interaction) というモードの画面になる。
そこで何か入力し、行末で C-j して見る。
すると、その場で評価され、その結果は次の行に表示される。
あるいは M-x lisp-interaction-mode RET としても同じ画面になる。
- (emacs-version) かっこがある時には関数
- emacs-version かっこがない時には変数
として評価される
(emacs-version)
"GNU Emacs 21.1.1 (powerpc--netbsd, X toolkit)
of 2002-01-18 on u"
emacs-version
"21.1.1"
上の例は、たまたま、同じ名前で両方定義されている。
ちょっと練習
(cons '(coffee tee) '(iwa namu))
((coffee tee) iwa namu)
(append '(coffee tee) '(iwa namu))
(coffee tee iwa namu)
(list '(coffee tee) '(iwa namu))
((coffee tee) (iwa namu))
ちょっと脇道
(list "a" "b") ; 評価しない
("a" "b")
(append "a" "b" "c") ; 評価してから .. 0x61 = 97
(97 98 . "c")
|