[xyzzy:04210] Re: PDIC
- Subject: [xyzzy:04210] Re: PDIC
- From: Tetsuya Kamei <kamei@xxxxxxxxxxxx>
- X-mailer: Denshin 8 Go V321.2b5
- X-yzzy-version: 0.2.0.129
三浦さん、こんにちは。
Mon, 21 Feb 2000 23:01:46 +0900 の
“[xyzzy:04202] Re: PDIC”
への返事です.
| edic.lのように別のウィンドウのbufferに書き込むにはどうしたらよいでしょうか?
| できれば、辞書を引くごとに別ウィンドウのbufferに追加して行き、単語帖が作れたらよい
| のですが..
試してませんが、こんなんでどうでしょう?
(defvar *pdic-output-buffer* "*PDIC Output*")
(defun consult-pdic-and-insert-results ()
(interactive)
(let ((word (get-current-word-or-selection))
(chan (dde-initiate "PDICW" "Dictionary"))
(answer))
(if chan
(progn
(dde-poke chan "Open" "")
(dde-poke chan "Find" word)
(setq answer (dde-request chan "Find"))
(dde-poke chan "Close" "")
(dde-terminate chan)
(stop-selection)
(let ((buffer (get-buffer-create *pdic-output-buffer*)))
(save-excursion
(set-buffer buffer)
(goto-char (point-max))
(insert word "\n" answer "\n"))
(pop-to-buffer buffer)))
(message "失敗です"))))
--
亀井哲弥(Tetsuya Kamei)
kamei@xxxxxxxxxxxx/JCA00343@xxxxxxxxxxx