
(defvar thesaurus-program "/mit/sipb/lib/perl/th" "\
This is the name of the program that extracts data from the thesaurus.
Some sites may have to give a full path name here.")

(defconst thesaurus-scratch-buffer-name "*thesaurus*" "\
This is the name of the buffer in which the thesaurus output is
displayed.")

(defun thesaurus-extract-word nil "\
From the current buffer, extract and return the word under the cursor." (byte-code "ÂÂŠÃÄ!ˆÅÄ!ˆ`‰ˆÃÄ!ˆÆÇ!?… ÈÉ!ˆÊ`\")*‡" [start word nil forward-char 1 backward-word re-search-forward "\\b" error "Can't find end of word" buffer-substring] 8))

(defun thesaurus-lookup-word (word exact) "\
Look up the word WORD in the thesaurus.
The results will be displayed in the buffer given by
`thesaurus-scratch-buffer-name'.  If EXACT is nil, all entries that
begin with WORD will be displayed.  If EXACT is non-nil, only the entry
that contains WORD will be displayed.
" (interactive "sWord to lookup? 
P") (byte-code "ÅˆÆ	!Ç!ˆŠÈq!ˆÉ ˆ
ƒ! ÊËÌ%‚( ÊËÍ%))‡" [thesaurus-buffer thesaurus-scratch-buffer-name exact thesaurus-program word nil get-buffer-create display-buffer buffer-flush-undo erase-buffer start-process "thesaurus" "-W" "-V"] 11))

(defun thesaurus-lookup-word-in-text (exact) "\
Like `thesaurus-lookup-word', but uses the word under the cursor." (interactive "P") (byte-code "ÁˆÂÃ \"‡" [exact nil thesaurus-lookup-word thesaurus-extract-word] 4))

(defun thesaurus-show-words (word) "\
List all words in the thesaurus that begin with WORD." (interactive "sWord or partial word to lookup? ") (byte-code "ÄˆÅ	!Æ!ˆŠÇq!ˆÈ ˆÉÊ
Ë#ˆÌÍÎ
%))‡" [thesaurus-buffer thesaurus-scratch-buffer-name word thesaurus-program nil get-buffer-create display-buffer buffer-flush-undo erase-buffer insert "***** Words matching \"" "\":

" start-process "thesaurus" "-w"] 11))
