Commits

stephent  committed 05760bd

Reorganized files; all of Per's originals renamed to .096 extension.
Updated default for `edict-dictionary-path' to use locate-data-directory.
FSF's Emacs compatibility.
Misc documentation improvements.

  • Participants
  • Parent commits 7231f95

Comments (0)

Files changed (29)

File ChangeLog.096

+Thu Apr 23 17:04:59 1992  Per Hammarlund  (perham at perham.nada.kth.se)
+
+	* Stepped up the version number, 0.9.6.
+
+	* Added edict-add-word, which basically initiates a private
+	dictionary session without starting with a word.
+
+Wed Apr 22 09:30:14 1992  Per Hammarlund  (perham at perham.nada.kth.se)
+
+	* Changed the declaration of the *edict-rmoaji-remaps* to be a
+	defvar followed by a setq.
+
+	* Rewrote and corrected some of the short getting started guide at
+	the beginning of edict.el.
+
+Mon Apr  6 06:58:59 1992  Bob Kerns  (rwk at taunton.crl.dec.com)
+
+	* Add eval-when around defstruct.  The compiler half of
+	  eval-when is in a patch that is loading into the compiler
+	  by edict.install.
+
+	* Make the english-plural rule exclude ies.
+
+	* Add edict-plural-ies.
+
+	* Call edict-expand-string with the right arguments.
+
+Fri Apr  3 20:38:03 1992  Bob Kerns  (rwk at taunton.crl.dec.com)
+
+	* Add english-plurals rule.
+
+	* Add syntax types.
+
+Thu Apr  2 02:18:27 1992  Bob Kerns  (rwk at taunton.crl.dec.com)
+
+	* Add rules for �����Ǥ� and their conjucations.
+
+	* forgot to exclude newlines in edict-slash-internal.
+
+	* forgot to exclude newlines in edict-char-bracket.
+
+	* Forgot to exclude newlines in edict-line-has-english.
+
+	* Forgot to exclude newlines in edict-parse-entry.
+
+	* Forgot to exclude newlines in pattern for finding english defs
+	  in edict-insert-english.
+
+Wed Apr  1 13:28:18 1992  Bob Kerns  (rwk at taunton.crl.dec.com)
+
+	* Put the cursor at the right place when creating an entry and
+	  there's no english.
+
+	* Sent to perham
+
+	* A bunch of minor tuneups to various things...
+
+	* Make the dictionary-editing commands go through a common wrapper
+	  to keep the electric stuff consistent.
+
+	* Add similar command for /.
+
+	* Add edict-open-bracket, edict-close-bracket, in dictionary
+	  editing mode.
+
+	* Allow edict-new-entry to take an argument.  <= 4 copies the
+	  kanji word into the new entry; >4 (i.e. c-U c-U) copies both
+	  the word and definition, allowing you to enter an alternate
+	  yomi.
+
+	* Split out edict-insert-entry from edict-add-entry-to-file,
+	  and add an inverse: edict-parse-entry.
+
+	* Allow a list of translations in edict-add-entry-to-file.
+
+	* Allow windows to be as small as emacs will allow.  This is
+	  important, because when we look for a suitably-sized window,
+	  this is all the bigger we look for.
+
+	* Add some more comments, and convert and/or/one-armed-if
+	  expressions into when/unless, since those are now provided
+	  by the (require 'cl).  This makes a number of things more
+	  readable.
+
+	* Move edict-test-rule and edict-test-string to edict-test.el.
+
+	* Merge in Per's changes below.
+
+	* Add a bit more commentary.
+
+	* Fix mising "w" and "W" in remap table.
+
+Tue Mar 31 06:16:26 1992  Bob Kerns  (rwk at taunton.crl.dec.com)
+
+	* edict-subst-affix's args can now be any function of one argument
+	  (the matched substring).
+
+	* Optimize edict-ignore in edict-subst-modified-affix, and
+	  add it to edict-subst-affix.
+
+	* Add ��ʤ� rule to try looking up number expressions without
+	  the number.
+
+Mon Mar 30 10:16:21 1992  Per Hammarlund  (perham at perham.nada.kth.se)
+
+	* Made sure that edict-new-entry put a closing '/' at the end of
+	the current row.  This only works when the user does
+	edict-new-entry, not for save. Sigh.
+
+	* Up version number 0.9.5
+
+	* Added handling of SKK in edict-set-henkan.  Crude
+	implementation. 
+
+Mon Mar 30 00:19:05 1992  Bob Kerns  (rwk at taunton.crl.dec.com)
+
+	* Don't insert [] after hiragana-only words, either!
+
+	* Electric dictionary editing:  When adding entries,
+	  Tab now moves between fields, and Return starts a new entry
+	  on the next line.  It arranges to be in nihongo mode when
+	  appropriate.  Also, it no longer inserts [] after katakana
+	  entries.
+
+Sun Mar 29 14:03:09 1992  Bob Kerns  (rwk at taunton.crl.dec.com)
+
+	* Replace (eval (cons 'and kludge with every.
+
+	* filter out some ��->�Ƥ� in ���ʤ�conjunctive
+
+	* Optimize edict-identity in rule RHS's
+
+	* Use regexp character categories where possible.
+
+	* fix typo: window-next -> next-window.
+
+Fri Mar 27 02:02:58 1992  Bob Kerns  (rwk at taunton.crl.dec.com)
+
+	* Get around nemacs regexp bug that was still deleting the katakan
+	  long-sound dash even after I fixed the regexp.  (Off-by-one
+	  error on the handling of the end of a range.  Sigh.)
+
+Thu Mar 26 20:56:00 1992  Bob Kerns  (rwk at taunton.crl.dec.com)
+
+	* Whitespace list accidentally included the katakana long-sound dash.
+
+	* The conjunctive rules patterns only allowed kanji, not
+	  kana-only spellings.
+
+Wed Mar 25 17:57:09 1992  Bob Kerns  (rwk at taunton.crl.dec.com)
+
+	* Merge in Per's change to edict-eigo-one-word.
+
+	* Up the version to 0.9.4
+
+	* Make whitespace stuff include all the different funny chars.
+
+	* Show the dictionary version number(s) after loading them.
+
+	* Replace '(lambda ...) with (function (lambda ...)).
+
+	* Make the default edict pathname be just "edictj", so it searches
+	  load path to find it.  This should minimize installation
+	  headaches.  You can still override this in your .emacs file.
+
+	* Use load-path to search for edict files if they're relative.
+
+	* Handle �� and punctuation in kanji insertion.  Also, let a
+	  couple of rules work with katakana stems (i.e. ����-derived stuff).
+
+Mon Mar 23 11:18:24 1992  Per Hammarlund  (perham at perham.nada.kth.se)
+
+	* Fixed a bug that caused it not to find a english word at the
+	beginning of the buffer.  It ran backward over (point-min).
+	Change made in "edict-eigo-one-word", >= to >.
+
+Mon Mar 23 07:37:03 1992  Bob Kerns  (rwk at taunton.crl.dec.com)
+
+	* Convert to JIS
+
+	* Increment version to 0.9.3
+
+	* Add edict-insert, edict-insert-english, edict-insert-���ܸ�.
+	  The main one to use is edict-insert, which figures out what
+	  language to insert based on the last lookup.
+
+	* Disallow the �� -> �� -> �� path.
+
+	* For the various �ޤ� rules, filter out cases derived from �ޤ���.
+
+	* Don't apply the potential-form rules if there's just the suffix.
+
+	* ���ƻ졼�� -- Be a whole lot more careful about what we consider
+	  an adverb/adjective, based on the previous form.  This should
+	  eliminate a lot of ������ verbs from having spurious forms.
+
+	* I decided that this filtering scheme isn't so bad after all,
+	  if the decision is made on just the preceding version.
+	  Having parts of speech would still be better, since it would
+	  localize the knowledge of what part of speech an ending could
+	  be.  But I think this will do for now.
+
+	* Separate out (��|��|���)�� case from ��ư�졼�� to ��ư�졼����,
+	  because this case must not include ��.  ���� should not become
+	  ��.  ���� is just a non-grammatical conversational case, anyway,
+	  and only occurs after �� so far as I know.
+
+	* Add more filtering to problematic conjunctive forms.
+
+	* Add filtering to filter out rules which are locally plausible,
+	  but could not be applied if what was removed is taken into
+	  consideration.  eg  �Ԥ� -> �Ԥ� -> �Ԥ� is not legit, even
+	  though each individual step is, because the first step is based
+	  on the assumption that it's an adverb, and turns it into an
+	  adjective.  The second assumes its the conjunctive form of a
+	  verb, and tries to find the dictionary form.
+
+	  This first pass is pretty bogus.  What it does is try to deduce
+	  it from what endings it has had along the way.  This can't
+	  really work, because there's no reasonable way to determine
+	  whether the ending in question is applying to this root, or
+	  or some further extention of this root.
+
+	  The right thing, is for rules to filter by/assert a part of speach.
+	  But first, I'm going to try this, just to get things going.
+
+	* Remove redundant rule: �֤����פ����̥롼��
+
+	* Merge in Per's changes.  Up the version to 0.9.2
+
+	* Provide error checking for unrooted patterns, so that last
+	  bug can't happen again.
+
+	* Fix �ֲ����פ�����conjunctive rules to only match at the end.
+
+Sat Mar 21 10:53:51 1992  Bob Kerns  (rwk at taunton.crl.dec.com)
+
+	* Eliminate duplicates in the result when we have substring matches.
+
+	* Potential form's rules were completely mangled; they were all
+	  clones of the same version, as if incomplete edited or
+	  something.  I fixed them up, and added another test to the suit.
+          The test suite happened to test the one case that the rest were
+	  cloned from, and ����ư��, which worked.
+
+	* Anti-infinite-recursion check didn't catch quite all the
+	  possible ways.  Also, in similar circumstances, it could
+	  put duplicates into the result.
+
+	* Add �� to other-suffixes, and Ⱦ to other-prefixes.
+
+Fri Mar 20 11:14:00 1992  Bob Kerns  (rwk at taunton.crl.dec.com)
+
+	* Remove punctuation before lookup.
+
+	* Make the windowing code more robust when editing in a tiny
+	  window.
+
+Thu Mar 19 15:03:52 1992  Bob Kerns  (rwk at taunton.crl.dec.com)
+
+	* Canonicalize number expressions.
+
+Tue Mar 17 10:35:45 1992  Per Hammarlund  (perham at perham.nada.kth.se)
+
+	* Added to a regexp in edict-display so that english verbs that
+	have a dictionary entry like /to XXX/ shall be treated as exact
+	matches in the match-list.
+
+	* fixed a small index error in edict-remap-romaji.
+
+Tue Mar 17 10:06:48 1992  Bob Kerns  (rwk at taunton.crl.dec.com)
+
+	* Merged in my changes below into 0.9, and made it 0.9.1
+
+Mon Mar 16 00:28:23 1992  Bob Kerns  (rwk at taunton.crl.dec.com)
+
+	* Prevent infinite recursion if rules have a loop.
+
+	* Add conjunctive form.  (�ꤤ�����ꤤ���Ӥ�), and ���롿���롿��
+	�� cases.
+
+Mon Mar 16 09:38:44 1992  Per Hammarlund  (perham at perham.nada.kth.se)
+
+	* Set the version to 0.9 and the date to current.
+
+	* Added functions to clean up a eigo string that, for whatever
+	reason has been written in both ASCII and JIS/EUC.  For instance
+	the string "str�����", will be tranformed to plain "strange".
+	The remap relation can be done better, and it should probably be
+	more complete.  How about a complete new nemacs-string* function
+	set!?!
+
+	* Changed the function edict-find-word-at-point that finds an
+	english word to take eigo written in Japanese [��-����-��] into
+	account too.
+
+	* Rewrote the version code, more things to be able to keep the
+	date and the version on different variables.
+
+	* Added/rewrote the "Getting Started Guide" in the file edict.el.
+
+	* Started on the documentation. edict.texinfo,  Took out a number
+	of lines from the edict.el file.
+
+	* Changed the name of the variable *private-edict-file* to
+	*edict-private-file*, just to keep variable names consistent.
+
+Mon Mar 16 00:28:23 1992  Bob Kerns  (rwk at taunton.crl.dec.com)
+
+	* Add ���󡢤��ޡ��͡�ĺ��������󡢷�������
+
+	* Add ���� to ��ư�졼����
+
+	* We have to add 1 to the window height because they include the
+	mode line.  This was hiding the last entry found when there were
+	more than 3 of them!
+
+	*�ֺ����夲��פβ�̾���ȴ�����
+
+	* Add ���ƻ졼���餺.
+
+	* ��ư�� ���� ��ư�졼���Ľ�ư�졼���ޤ�ʬ���Ƥ��������ֺ����夲���
+	�򤷤ޤ�����
+
+	* Add the ���� verb endings as alternates to ���ʤ�, and
+	add �֤����פ����̥롼��
+
+Sun Mar 15 00:01:05 1992  Bob Kerns  (rwk at taunton.crl.dec.com)
+
+	* �֤��ơ����ơפ����̥롼��: Fix bug introduced in fixing another
+	bug.
+
+	* Add �� to the list of endings that ��ư�� apply to.  This is
+	actually confusing things a bit, but in a way that helps the user.
+	Logically, if an adverb appears before a verb which is sometimes a
+	��ư��, it probably is modifying the verb, not the other way
+	around.  But the user was probably asking about the adverb, since
+	the ��ư�� are all very basic words the user probably knows.  I
+	suppose I could start returning ��ư�� in addition to the main
+	verb, so the user would see these as well.  I suspect this would
+	be more distraction than benefit.  If the user doesn't know the
+	part that was stripped off, he can just mark it, and inquire.
+
+	* Add �ʤ� as ��ư��.  Add �������Ρ����פȡֹԤ��פȡ־夲���
+	�ȡ�����ס�
+
+	* Be more careful about ordering the results.
+
+	* ����ơ����ơפ����̥롼��
+
+	* Remove debugging notify accidentally left inserted.
+
+	* Allow modifiers rule after ����ư��.
+
+	* Correct an error in �֤���פ����̥롼��.
+
+	* Suppress single-kanji matches unless they're needed.
+
+	* Didn't have anything for handling ������!!
+
+	* Forgot to drop the ���� from humble form.
+
+	* Fix up adjectives once more.
+
+	* fix humble's regexp
+
+	* �ɸ����Ƭ�� tried to be both prefix and suffix(!)
+
+	* �Ƥ��ޤ� and �Ǥ��ޤ� cant be combined after all.
+
+	* Fix incorrect kanji in other-prefixes.
+
+	* Coallesce the �Ƥ��ޤ� family into a single rule, and make it
+	  properly preserve the �ơ���� distinction.  No need for
+	  past-tense forms since they're regular; the past-tense rules
+	  will handle it.
+	  
+
+	* Apply the prefixes only to ����
+
+	* Added ���� to suffixes.
+
+	* Add basic affixes used with ̾�졣
+
+	* Explicit rules for ���ʤ����ʤ���
+
+	* Get ���ƻ� negative right, and include more formal varients.
+
+	* ʿ��̾�Ρ֤��� as honorific prefix, in addition to ��.
+
+	* Remove ���� from ��ư��; that gets covered elsewise anyway.
+
+	* Minimum length on ��ư��.
+
+	* Only do command if at least two chars long.
+
+	* Tighten up a couple more rules wrt ���� only after ���� or ����.
+
+	* Tighten up various rules wrt legal verb endings.  No �š���, etc.
+
+	* Typo in �֤��褦�פ����̥롼��, ����褦�ס��֤��褦��
+
+	* Forgot a few '$'s on the ends of patterns.
+
+	* Add a complete set of volitionals.  This pretty much completes
+	  the morphology.
+
+	* Supply a few more ��ư�� and other endings.
+
+	* Irregular �褿���롢�������롢��������
+
+	* Avoid generating �� or �� as entire words.
+
+	* Fix up ��������Ρ֤����פ������� -> ���ʤΡ֤����פ�������
+
+	* Add an ����ư�� version of the desiderative rule.
+
+	* Added �������� to desideratives.
+
+	* Tighten up ���ޤ���
+
+	* Tightened up adjective rules so they don't go off on ���롣
+
+	* Added Irregular ��ޤ������ޤ���
+
+	* Irregular �褤, ����
+
+	* Add irregular info for ���ʤ�, �ʤ�.
+
+	* Correct mistaken rule for ���ʤ�.
+
+Sat Mar 14 16:22:07 1992  Bob Kerns  (rwk at taunton.crl.dec.com)
+
+	* Add edict-test-string.
+
+	* Add debugging feature to edict-expand-string to help track down
+	  what rules do what in the event of surprises.
+
+	* Handle ���� as part of the �ơ��� rules.  Faster, and doesn't
+	  generate spurious instance of plain past.
+
+	* Include the zenkaku versions of the punctuation in
+	  *edict-(kanji|eigo)-whitespace*.
+
+	* Clean up some lurking problems in edict-clean-up-(kanji|eigo)
+
+	* Fix a problem with exact matches in the substitution routines.
+
+	* Make edict-expand-string more aggressive in preventing possible
+	  infinite recursion.
+
+	* Add ����� rule for its irregularity.
+
+	* Add ����� rule for its irregularity.
+
+	* Add �Ԥ� special rule for its irregularity
+
+	*	Additions to improve window handling
+		Add private dictionary, and commands to add to it.
+		Add morphologic analysis so that the dictionary forms
+		of words can be found from inflections/affixes/etc.
+		Add rule for plain negative, plain imperitive.
+		Add rule for desiderative.
+		Make it require cl.el, since I got tired of using a crippled lisp.
+		Use DEFSTRUCT for the rules, and give them names so that
+		you can redefine a rule without having to reload the entire
+		database of rules.
+		Add '#' to the characters that get flushed from kanji words
+		since that's a common inclusion character in fj newsgroups.
+		Split the set out into a variable *edict-kanji-whitespace*
+		to aid in user extensibility.
+		Added rule for ����ư�� �ơ��� -> �� conversion, which
+		I accidentally deleted earlier.
+		Added conditional form for adjectives.
+		Added causitive, passive, ����ư�� potential
+		Added some more missing ����ư�� rules, and
+ 		tightened up a number of rules, especially ����ư�� rules.
+		Upgrade the sorting of exact matches to the top to
+		handle exact matches of dictionary forms produced by
+		the rule set.  For example, ���ʤ��� should have ����
+		sorted to the top of the list.
+		Updated credits.  Added *edict-eigo-whitespace* like
+		*edict-kanji-whitespace*, and fixed a bug in the code.
+		Added rules for �����㤦��������ä�
+
+Fri Mar 13 17:45:27 1992  Per Hammarlund  (perham at perham.nada.kth.se)
+
+	* Merged Bob's extensions just below into the distribution
+	version.  (Some of the things mentioned right above here,
+	shold be below.)
+
+Fri Mar 13 17:44:06 1992  Bob Kerns (rwk at crl.dec.com)
+
+	* Added functionality to translate verbs and adjectives to a basic
+	form.
+
+Wed Mar 11 09:41:23 1992  Per Hammarlund  (perham at perham.nada.kth.se)
+
+	* Added edict-version and a variable *edict-version* to keep track
+	of the current version of the software.
+
+	* Type checks on the variable *edict-files* in function
+	edict-init.
+
+Tue Mar 10 10:22:21 1992 Bob Kerns (rwk at crl.dec.com)
+
+	* I've fixed some lingering bugs in restoring the window sizes
+	in multi-window mode.
+
+	* I've made it canonicalize whitespace, so that you can select
+	jukugo that wrap around lines, include whitespace, or whatever.
+	Also, multi-word english phrases can include newlines,
+	indentation, etc.
+
+Tue Mar 10 07:11:24 1992  Bob Kerns (rwk at crl.dec.com)
+
+        * I fixed the displaying to not screw up if there's a window above
+	(for example, when using it on fj.* gnus articles it used to
+	gradually grow the Subject window and shrink the Article window).
+
+	* I put giving a positive argument to the searching commands add a
+	new entry.  Locally, I put these commands on m-& and m-*; and if
+	m-& doesn't find a compound, I do c-U m-& and add it.
+
+	* m-- m-& (or whatever) will remove the window.  I did this
+	because c-X 1 is too much; if I was in 2 window mode, I don't want
+	to go to 1 window mode.
+
+	* I made the display show any exact matches before the inexact
+	matches.  So if I do it on ��, I get that line first, instead of
+	buried in amongst all the compounds that sort earlier.
+
+Mon Mar 9 00:00:00 1992  Bob Kerns (rwk at crl.dec.com)
+
+	* This gives you m-X edict-add-english and m-X
+	edict-add-kanji, and automagically maintains a private 
+	dictionary  in *edict-private-file*.
+
+1991, 1992 Per Hammarlund (perham at perham.nada.kth.se)
+
+	* Wrote the bare bones of edict.el.
+
 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 # Boston, MA 02111-1307, USA.
 
-VERSION = 1.01
-AUTHOR_VERSION = 0.9.7
+VERSION = 1.02
+AUTHOR_VERSION = 0.9.8
 MAINTAINER = Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp>
 PACKAGE = edict
 PKG_TYPE = regular
                 ts-mode.el
 
 ELCS = edict.elc dui.elc edict-morphology.elc edict-japanese.elc \
-       edict-english.elc edict-edit.elc edict-test.elc
+       edict-english.elc edict-edit.elc edict-test.elc dui-registry.elc
 
 COMPATIBILITY-FLAGS = -eval "(setq byte-compile-print-gensym nil)"
 
 include ../../XEmacs.rules
 
-EXCLUDES = --exclude='edictj' --exclude='CVS'
-
 all:: $(ELCS) auto-autoloads.elc
 
 srckit: srckit-std

File Makefile.096

+#
+#  Copyright (c) 1992 Per Hammarlund (perham@nada.kth.se)
+#
+# This is a silly makefile to ease the handling of the edict software,
+# it can do silly things like building a distribution (taring),
+# cleaning and such.
+#
+#   This program is free software; you can redistribute it and/or modify
+#   it under the terms of the GNU General Public License as published by
+#   the Free Software Foundation; either version 1, or (at your option)
+#   any later version.
+# 
+#   This program is distributed in the hope that it will be useful,
+#   but WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#   GNU General Public License for more details.
+# 
+#   You should have received a copy of the GNU General Public License
+#   along with this program; if not, write to the Free Software
+#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# 
+
+EMACS-LISP-FILES = edict-test.el edict.el
+TEXT-FILES = COPYING README edict.ChangeLog edict.doc
+DEMO-DICT-FILE = edictj.demo
+INSTALL-FILES = Makefile install.edict
+DISTRIBUTION-FILES =  $(EMACS-LISP-FILES) $(TEXT-FILES) $(DEMO-DICT-FILE) $(INSTALL-FILES)
+DIST-FILE-NAME = edict.tar
+
+
+distribution:	$(DISTRIBUTION-FILES)
+	tar -cvf $(DIST-FILE-NAME) $(DISTRIBUTION-FILES);\
+	compress $(DIST-FILE-NAME)
+
+
+
+

File Makefile.FSF

+# Makefile.FSF
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2, or (at your option) any
+# later version.
+
+# It is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with it; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# Makefile to bytecompile edict.el sources under FSF Emacs and build a
+# tarball that can be untarred somewhere on the load-path.
+
+# The recommended location is .../emacs/site-lisp/edict, and the
+# default location for the dictionary is there also.
+
+AUTHOR_VERSION = 0.9.8
+MAINTAINER = Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp>
+
+# edict-autoloads.el is automatically generated using XEmacs.  It is
+# therefore not guaranteed to be 100% up-to-date, but probably is.
+# It can be loaded from your .emacs.
+
+ETC = edict-test.el.096 edict.el.096 edict.doc.096 README.096 \
+      Makefile.096 install.edict.096 README ChangeLog TODO COPYING
+
+EXTRA_SOURCES = edictj.demo ts-mode.el auto-autoloads.el Makefile
+
+ELCS = edict.elc dui.elc edict-morphology.elc edict-japanese.elc \
+       edict-english.elc edict-edit.elc edict-test.elc dui-registry.elc
+
+# path to Emacs
+EMACS = emacs
+
+# Emacs without any site or user customizations
+VANILLA = --no-init-file --no-site-file
+
+# path to utilities
+TAR = tar
+
+# nothing below this line should be changed
+
+.phony: tar
+
+%.elc: %.el
+	$(EMACS) $(VANILLA) -batch \
+		 --eval "(setq load-path (cons \".\" load-path))" \
+		 -f batch-byte-compile $<
+
+all:: $(ELCS)
+
+clean::
+	rm -f $(ELCS)
+
+mostlyclean: clean
+
+extraclean: clean
+
+distclean: extraclean
+	rm -f core *~
+
+tar:
+	if [ -e Makefile.FSF ]; then \
+         mv Makefile Makefile.XEmacs; \
+	 cp Makefile.FSF Makefile; \
+        fi
+	$(TAR) cvf edict-$(AUTHOR_VERSION)-fsf.tar \
+	           $(ELCS:.elc=.el) $(ETC) $(EXTRA_SOURCES)
+	gzip -9 edict-$(AUTHOR_VERSION)-fsf.tar
+	if [ -e Makefile.XEmacs ]; then mv Makefile.XEmacs Makefile; fi
+***** edict.el optimized for XEmacs *****
 
-Copyright (C) 1992 Bob Kerns <rwk@crl.dec.com>
+Version 0.9.8
 
-Package contents Copyright (c) 1991, 1992  Per Hammarlund <perham@nada.kth.se>
-and Copyright (c) 1992 Bob Kerns <rwk@crl.dec.com>
+This file Copyright 1998 Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp>.
 
-Some code that looks for translations of english and japanese using the
-EDICTJ Public Domain japanese/english dictionary.
+The edict.el package is Copyright 1991, 1992 Per Hammarlund 
+  <perham@nada.kth.se> and 1998 Stephen J. Turnbull
+  <turnbull@sk.tsukuba.ac.jp>.
 
-edict.el written by Per Hammarlund <perham@nada.kth.se>
-Morphology and private dictionary handling/editing by Bob Kerns <rwk@crl.dec.com>
-International installation script by Bob Kerns <rwk@crl.dec.com>
-Helpful remarks from Ken-Ichi Handa <handa@etl.go.jp>.
-The EDICTJ PD dictionary is maintained by Jim Breen <jwb@monu6.cc.monash.edu.au>
-Your credits here if you contribute!
+Individual files may have their own Copyrights differing from the above.
 
+This file is part of XEmacs.
 
-This distribution includes the following files.
+It is free software; you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your
+option) any later version.
 
-README			You should read this file first!  (OK, you are...)
-COPYING			The GNU public license.
-edict.ChangeLog		History of changes.
-edict.el		The actual code for the dictionary lookup program.
-edict-test.el		The test suite for the dictionary lookup program.
-edict.doc		The documentation.  Read this for usage instructions.
-install.edict		The installation script, internationalized.
-			(Please contribute a language, currently only
-			Japanese, English, and Swedish.)
-Makefile		You won't need this, this is to build distributions.
-edictj.demo		A demo version of the edictj public-domain dictionary.
-			You may use this to try out the software; I suggest using
-			the words 'car' and '��' as a test cases.
+XEmacs is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
 
-			You should obtain the real dictionary via
-			anonymous ftp from the /pub/Nihongo directory
-			at monu6.cc.monash.edu.au. 
+You should have received a copy of the GNU General Public License
+along with XEmacs; if not, write to the Free Software Foundation,
+Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-The installation process, ie running the install script, creates the
-following additional files:
+Original author:  Per Hammarlund <perham@nada.kth.se>
+Other authors:    Bob Kerns <rwk@crl.dec.com>
+                  Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp>
 
-edict.elc		Compiled version of edict.el; the actual compiled library
-			code to load.
-edict.emacs		Sample code to include in your .emacs file.
+Adapted-by:  Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp> for XEmacs
+Maintainer:  Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp>
 
-To run the installation script, cd to the directory containing this software,
-and do ./install.edict, and answer the questions.
+***** Whatzit? *****
 
-cd /usr/local/src/edict
-./install.edict
+The original edict.el was written by Per Hammarlund. It is an
+interface to the EDICT Japanese-English dictionary compiled by Jim
+Breen at Monash University.  Using the region and couple of
+keystrokes, edict.el will look up the Japanese key and return all the
+EDICT entries containing that key, in a pop-up buffer.  English is
+even easier, you just put point anywhere in the word you want to look
+up.
+
+Bob Kerns added a morphology engine, which reduces a highly inflected
+Japanese word to a list of dictionary forms (eg, itta -> (iku, iu)),
+all of which are looked up.
+
+After several years of service, it became partially incompatible with
+recent FSF Emacsen, especially the keymaps and the byte compiler, and
+never was adapted for XEmacs (which only recently acquired Japanese
+capability).  This BETA release adapts edict.el to XEmacs (because
+that's what the maintainer uses), packages it for ease of installation
+on XEmacs, and provides a unified interface to the functions via the
+Dictionary Lookup minor mode.
+
+Documentation from version 0.9.6 (the last version maintained by Per
+Hammarlund) is included in the appropriate .../etc directory, with the
+file extension .096.  The sources for version 0.9.6 are available at
+the URL below in edict-0.9.6-src.tar.gz.  (This numbering is unrelated
+to the numbering of XEmacs packages.)
+
+***** Installation *****
+
+For XEmacs >= 20.3, get edict-<version>-pkg.tar.gz from
+
+    http://turnbull.sk.tsukuba.ac.jp/Tools/XEmacs/packages/edict/
+
+and untar it in the the directory ~/.xemacs (or root directory of your
+package hierarchy, if you know what that is).  If you are using XEmacs 
+>= 20.5, you're done.
+
+If you're using XEmacs 20.3 or 20.4, then add
+
+	 (load-file "~/.xemacs/lisp/edict/auto-autoloads.el")
+
+to your ~/.emacs or ~/.xemacs/init.el.  Get edict (the dictionary)
+from ftp://ftp.cc.monash.edu.au/pub/nihongo/, and install it in an
+appropriate etc/ or etc/edict/ in your package hierarchy
+(~/.xemacs/etc/ is fine).  For trial purposes, there is a tiny
+edict.demo dictionary supplied with edict.el.
+
+For the FSF's distribution of Emacs >= 20.0, get
+edict-<version>-fsf.tar.gz from the URL above.  Unpack it somewhere;
+.../emacs/site-lisp/edict/ is recommended.  The dictionary should go
+in the same directory.  (This is intended to be automatically found,
+but version 0.9.8 doesn't do that yet.  You will have to set either
+the `edict-dictionary-path' or `edict-dictionaries'.)
+
+Users of other versions of Mule are welcome to play around; please
+tell me what you did, whether it works or not.  Due to changes in
+keymap code, it is highly unlikely that the current version of
+edict.el will work with nemacs or Mule based on Emacs version 18.
+
+If you have special needs, the package sources are available in
+edict-<version>-src.tar.gz.  Makefile is very XEmacs (>=20) specific;
+Makefile.FSF is provided for building for the FSF's distribution of
+Emacs.  The FSF's Emacs and XEmacs are nearly byte-code compatible;
+unfortunately the incompatibilities are most likely to show up in Mule
+applications, so you should byte-compile the source with the Emacs you
+plan to use the package with.
+
+***** User Setup *****
+
+Users of recent XEmacsen should need little setup, unless you are
+using public dictionaries not named "edict" or user dictionaries not
+in your home directory or not named ".edict".  In that case, set the
+variables `edict-dictionaries' and `edict-user-dictionary' as needed.
+
+Other users may need to set up autoloads and possibly their
+load-paths.  A file auto-autoloads.el is provided; this file can only
+(at this time) be produced using XEmacs, but it should work with other
+Emacs.  This file is automatically consulted by XEmacs; users of the
+FSF distribution of Emacs should be able to use it by adding
+
+      (load-file "<path-to>/site-lisp/edict/auto-autoloads.el")
+
+to .emacs.  (`load-file', rather than `load-library', is suggested
+because every XEmacs package has a file named auto-autoloads.el.)
+
+The necessary autoloads may also be found by
+
+		  grep -A 1 '^;;;###autoload$' *.el
+
+You should also probably set the variable `edict-dictionary-path' to
+help edict find your public dictionaries.
+
+For some reason, Mule occasionally has trouble recognizing the file
+coding system of edict files.  If so, the Monash distribution
+dictionary `edict', which is in EUC-JP format, should be correctly
+initialized by
+
+	   (setq edict-dictionaries '(("edict" . euc-jp)))
+
+in .emacs.  The value of this variable is a LIST of CONS-or-STRING.
+If a CONS, it should have a STRING as car and a CODING-SYSTEM as cdr.
+Note that the name of this variable has changed.  If your dictionary
+directory is not found at all, you can setq `edict-dictionary-path' to
+a LIST of strings, each of which should be a path to a directory which
+might contain edict dictionaries.
+
+***** Usage *****
+
+The interface to edict is now the Dictionary Lookup minor mode
+(dl-mode).  It is invoked as usual by (eg) "M-x dl-mode", and its
+modeline indicator is "dl".  dl-mode is autoloaded.  The various
+functions are bound to keys in a mode-specific keymap, which is
+invoked by a prefix key.  The default prefix is "C-c $" (by analogy
+with ispell's "M-$").
+
+Unlike the former interface, dui is intended to be a general interface
+to various dictionary-like commands.  Dictionary lookup is bound to
+"s" (for "search") in the sub-keymap; insertion and help are bound
+to "i" and "d" (for "describe method" respectively.  The search mode
+is initialized to "EDICT search Japanese" by default.
+
+Using a prefix argument allows you to change modes.  Eg, "C-u C-c $ s"
+generates a prompt for a "Method:".  Currently valid search methods
+include "EDICT search Japanese", "EDICT search English", and "ispell
+word".  Valid insert methods include "EDICT add English" and "EDICT add 
+Japanese".
+
+edict.el provides a simple dictionary editing mode, automatically
+invoked by the "EDICT add ..." methods, with TAB switching 
+between fields.  An experimental `electric-henkan' mode is available,
+in which the mode recognizes whether a field is Japanese or English
+and invokes your preferred henkan method appropriately.  To try this
+out (setq edict-use-electric-henkan t).  Note that electric henkan
+uses the LEIM interface, so it cannot work if your preferred input
+method is XIM.
+
+Due to the indirect way in which the actual methods are called, a
+separate help function, `dui-describe-method', bound to "C-c $ d", is
+provided to access method documentation.
+
+Enjoy!
+
+***** Bug reports, comments, and feature requests *****
+
+Please send these to "Stephen Turnbull" <turnbull@sk.tsukuba.ac.jp>.
+
+Bug reports are of course of high priority, but I am hoping that users 
+will also report inflections and idioms that the morphology engine
+does not handle.
+
+Known bugs and problems are in the file TODO.  (Documentation and
+organization are both known bugs....)
+
+With the reimplementation as a minor mode, it now makes sense to
+provide keystrokes for variations on the basic theme.  One example
+(already implemented for ispell) is to use dl-mode to access other
+dictionary applications.  Another possibility is that kanjidic can be
+loaded into the *edict* buffer as well; one could imagine restricted
+functions (not yet implemented) that only search kanjidic or only
+edict.  Suggestions are welcome.
+
+***** Historical notes *****
+
+The files edict.el.096 and edict-test.el.096 in the source
+distribution are from the original version 0.9.6 distribution grabbed
+from ftp.cc.monash.edu.au.  The ChangeLog for version 0.9.6 is in
+ChangeLog.096, which is included in all forms of the current
+distribution.
+
+The .el files in this package have been converted to ISO-2022-JP
+encoding.
+
+All hail Jim, Per, and Bob!
+
+
+Copyright (C) 1992 Bob Kerns <rwk@crl.dec.com>
+
+Package contents Copyright (c) 1991, 1992  Per Hammarlund <perham@nada.kth.se>
+and Copyright (c) 1992 Bob Kerns <rwk@crl.dec.com>
+
+Some code that looks for translations of english and japanese using the
+EDICTJ Public Domain japanese/english dictionary.
+
+edict.el written by Per Hammarlund <perham@nada.kth.se>
+Morphology and private dictionary handling/editing by Bob Kerns <rwk@crl.dec.com>
+International installation script by Bob Kerns <rwk@crl.dec.com>
+Helpful remarks from Ken-Ichi Handa <handa@etl.go.jp>.
+The EDICTJ PD dictionary is maintained by Jim Breen <jwb@monu6.cc.monash.edu.au>
+Your credits here if you contribute!
+
+
+This distribution includes the following files.
+
+README			You should read this file first!  (OK, you are...)
+COPYING			The GNU public license.
+edict.ChangeLog		History of changes.
+edict.el		The actual code for the dictionary lookup program.
+edict-test.el		The test suite for the dictionary lookup program.
+edict.doc		The documentation.  Read this for usage instructions.
+install.edict		The installation script, internationalized.
+			(Please contribute a language, currently only
+			Japanese, English, and Swedish.)
+Makefile		You won't need this, this is to build distributions.
+edictj.demo		A demo version of the edictj public-domain dictionary.
+			You may use this to try out the software; I suggest using
+			the words 'car' and '��' as a test cases.
+
+			You should obtain the real dictionary via
+			anonymous ftp from the /pub/Nihongo directory
+			at monu6.cc.monash.edu.au. 
+
+The installation process, ie running the install script, creates the
+following additional files:
+
+edict.elc		Compiled version of edict.el; the actual compiled library
+			code to load.
+edict.emacs		Sample code to include in your .emacs file.
+
+To run the installation script, cd to the directory containing this software,
+and do ./install.edict, and answer the questions.
+
+cd /usr/local/src/edict
+./install.edict

File README.XEmacs

-***** edict.el optimized for XEmacs *****
-
-Version 0.9.7
-
-This file Copyright 1998 Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp>.
-
-The edict.el package is Copyright 1991, 1992 Per Hammarlund 
-  <perham@nada.kth.se> and 1998 Stephen J. Turnbull
-  <turnbull@sk.tsukuba.ac.jp>.
-
-Individual files may have their own Copyrights differing from the above.
-
-This file is part of XEmacs.
-
-It is free software; you can redistribute it and/or modify it
-under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your
-option) any later version.
-
-XEmacs is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with XEmacs; if not, write to the Free Software Foundation,
-Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-Original author:  Per Hammarlund <perham@nada.kth.se>
-Other authors:    Bob Kerns <rwk@crl.dec.com>
-                  Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp>
-
-Adapted-by:  Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp> for XEmacs
-Maintainer:  Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp>
-
-***** Whatzit? *****
-
-The original edict.el, by Per Hammarlund, was an interface to the
-EDICT Japanese-English dictionary compiled by Jim Breen at Monash
-University.  Using the region and couple of keystrokes, edict.el will
-look up the Japanese key and return all the EDICT entries containing
-that key, in a pop-up buffer.  English is even easier, you just put
-point anywhere in the word you want to look up.  
-
-Bob Kerns added a morphology engine, which reduces a highly inflected
-Japanese word to a list of dictionary forms (eg, itta -> (iku, iu)),
-all of which are looked up.
-
-After several years of service, it became partially incompatible with
-recent FSF Emacsen, especially the byte compiler, and never was
-adapted for XEmacs (which only recently acquired Japanese capability).
-This BETA release adapts edict.el to XEmacs (because that's what the
-maintainer uses), packages it for ease of installation on XEmacs, and
-provides a unified interface to the functions via the Dictionary
-Lookup minor mode.
-
-The next release should provide assurance of FSF Emacs, version 20,
-compatibility for edict.el proper, and possibly a port of the
-Dictionary Lookup minor mode.
-
-***** Installation *****
-
-For XEmacs >= 20.3, get edict-<version>-pkg.tar.gz from
-
-    http://turnbull.sk.tsukuba.ac.jp/Tools/XEmacs/packages/edict/
-
-and untar it in the the directory ~/.xemacs (or root directory of your
-package hierarchy, if you know what that is).  If you are using XEmacs 
->= 20.5, you're done.
-
-If you're using XEmacs 20.3 or 20.4, then add
-
-	 (load-file "~/.xemacs/lisp/edict/auto-autoloads.el")
-
-to your ~/.emacs or ~/.xemacs/init.el.  Get edict (the dictionary)
-from ftp://ftp.cc.monash.edu.au/pub/nihongo/, and install it in an
-appropriate etc/ or etc/edict/ in your package hierarchy
-(~/.xemacs/etc/ is fine).  For trial purposes, there is a tiny
-edict.demo dictionary supplied with edict.el.
-
-Users of other versions of Mule are welcome to play around; please
-tell me what you did, whether it works or not.
-
-***** User Setup *****
-
-Users of recent XEmacsen should need little setup, unless you are
-using public dictionaries not named "edict" or user dictionaries not
-in your home directory or not named ".edict".  In that case, set the
-variables `edict-dictionaries' and `edict-user-dictionary' as needed.
-
-Other users may need to set up autoloads and possibly their
-load-paths.  The necessary autoloads may be found by "grep -A 1
-'^;;;###autoload$' *.el".  You will also probably need to set the
-variable `edict-dictionary-path' to help edict find your public
-dictionaries.
-
-For some reason, Mule occasionally has trouble recognizing the file
-coding system of edict files.  If so, the Monash distribution
-dictionary `edict', which is in EUC-JP format, should be correctly
-initialized by
-
-	   (setq edict-dictionaries '(("edict" . euc-jp)))
-
-in .emacs.  The value of this variable is a LIST of CONS-or-STRING.
-If a CONS, it should have a STRING as car and a CODING-SYSTEM as cdr.
-Note that the name of this variable has changed.  If your dictionary
-directory is not found at all, you can setq `edict-dictionary-path' to
-a LIST of strings, each of which should be a path to a directory which
-might contain edict dictionaries.
-
-FSF Emacs users will probably not be able to use `dl-mode', described
-below, bcause of differences in implementation of keymaps.  (This is
-completely untested at this writing.)  In that case, you should also
-do the relevant `define-key' calls in .emacs.  (See the commentary at
-the top of edict.el; the autoloads are unnecessary because edict.el
-now uses the auto-autoloads.el file.)
-
-***** Usage *****
-
-The interface to edict is now the Dictionary Lookup minor mode
-(dl-mode).  It is invoked as usual by (eg) "M-x dl-mode", and its
-modeline indicator is "dl".  dl-mode is autoloaded.  The various
-functions are bound to keys in a mode-specific keymap, which is
-invoked by a prefix key.  The default prefix is "C-c $" (by analogy
-with ispell's "M-$").
-
-Unlike the former interface, dui is intended to be a general interface
-to various dictionary-like commands.  Dictionary lookup is bound to
-"s" (for "search") in the sub-keymap; insertion and help are bound
-to "i" and "d" (for "describe method" respectively.  The search mode
-is initialized to "EDICT search Japanese" by default.
-
-Using a prefix argument allows you to change modes.  Eg, "C-u C-c $ s"
-generates a prompt for a "Method:".  Currently valid search methods
-include "EDICT search Japanese", "EDICT search English", and "ispell
-word".  Valid insert methods include "EDICT add English" and "EDICT add 
-Japanese".
-
-edict.el provides a simple dictionary editing mode, automatically
-invoked by the "EDICT add ..." methods, with TAB switching 
-between fields.  An experimental `electric-henkan' mode is available,
-in which the mode recognizes whether a field is Japanese or English
-and invokes your preferred henkan method appropriately.  To try this
-out (setq edict-use-electric-henkan t).  Note that electric henkan
-uses the LEIM interface, so it cannot work if your preferred input
-method is XIM.
-
-Due to the indirect way in which the actual methods are called, a
-separate help function, `dui-describe-method', bound to "C-c $ d", is
-provided to access method documentation.
-
-Enjoy!
-
-***** Bug reports, comments, and feature requests *****
-
-Please send these to "Stephen Turnbull" <turnbull@sk.tsukuba.ac.jp>.
-
-Bug reports are of course of high priority, but I am hoping that users 
-will also report inflections and idioms that the morphology engine
-does not handle.
-
-Known bugs and problems are divided between the file TODO and the
-commentary to edict.el.  (Documentation and organization are both
-known bugs....)
-
-With the reimplementation as a minor mode, it now makes sense to
-provide keystrokes for variations on the basic theme.  One example
-(already implemented for ispell) is to use dl-mode to access other
-dictionary applications.  Another possibility is that kanjidic can be
-loaded into the *edict* buffer as well; one could imagine restricted
-functions (not yet implemented) that only search kanjidic or only
-edict.
-
-***** Historical notes *****
-
-The files edict.el.distrib and edict-test.el.distrib are from the original
-distribution grabbed off of monash.  The .el files in this package have
-been converted to ISO-2022-JP encoding.
+file: TODO
+
+This file lists the known outstanding bugs and assorted desirable
+changes.  The latter are divided into "prettification" (not requiring
+thinking on this maintainer's part), "to do" (actual work, but I have
+a pretty good idea how to do it), and "projects" (either I don't know
+how to do it in Emacs LISP or careful thought about user interface and
+the like is needed).
+
+Closed bugs, to do items, and projects are moved to ChangeLog but the
+remainder are not recycled.
+
 BUGS
 
-1.   [OK] Register some insert [ and edit - can't, are none ] methods.
-2.   [OK] Deal with the case of first entry in the dictionary.
-3.   Give kanjidic entries precedence in list.
-4.   Give private dictionary entries precedence in list.
-5.   Editing does not work when the dictionaries aren't loaded
-     (edict-user-dictionary is unbound).  Probably should also check
-     for existence of edict-buffer.
-6.   Completion of search methods will find insert methods, eg, need to
-     filter in the same way as history.
+1.  Editing does not work when the dictionaries aren't loaded
+    (edict-user-dictionary is unbound).  Probably should also check
+    for existence of edict-buffer.
+2.  Completion of search methods will find insert methods, eg, need to
+    filter in the same way as history.
+3.  To conform with Makefile.FSF need to make default
+    edict-dictionary-path point to .../emacs/site-lisp/edict.
+4.  edict-standin does (aref i global-map)
 
 PRETTIFICATION
 
-1.   Move customizable variables to separate file.
+1.  Move customizable variables to separate file.
+2.  Give kanjidic entries precedence in list.
+3.  Give private dictionary entries precedence in list.
+4.  The nomenclature is non-standard (use of `*' in variable names).
+    Change these to the `edict-...' style.
+5.  Fix style of docstrings and move comments into docstrings where
+    appropriate.
+6.  Move the docstring for `edict-init' back into the function.  It's
+    currently not there because XEmacs gets confused about indentation
+    if it is.
 
+TO DO
+
+1.  Maybe add a customize interface (the only thing that might want
+    customized that I know of is the proposed edict-coding-system
+    variable, but there it would be definitely useful since Custom can 
+    be set up to automatically reread EDICT, unlike setq).
+    [SJT: also *edict-files*.]
+2.  FSF compatibility.
+3.  A "report private dictionary to Jim Breen" function.
+4.  A "parse-word-at-point" function.  (I was wrong, it isn't in 
+    the current version.  Hard; you can ask for it, but I don't know
+    that I'll be able to produce a good one quickly :-)
+5.  Info documentation.
+
+PROJECTS
+
+1.  Generalization (eg for Korean/Chinese, or for Spanish/German for
+    that matter).
+2.  Error handling on file I/O etc is rude.  Especially fix the
+    `with-output-to-temp-buffer' stuff.
+3.  Why are there so many `edict-add-*' and `edict-insert-*' commands?
+4.  Make the morphology rewrite system make sense, and be consistent
+    with the docs.
+5.  kanjidic support
+6.  Figure out how to handle both FSF's functionality and XEmacs's
+    functionality portably
+7.  Use VM's tapestry.el to track window configuration, or borrow
+    from view-process-mode.el.
+8.  Bug report/feature request function.  (Use reporter.el, see
+    view-process-mode.el for how.)
+9.  Need to handle JIS X 0201 (and so on) in the dictionary as well as
+    in the key.
+10. The timing for missing/unreadable files and preregistered methods
+    is bogus.  Think and fix.
+11. "Upstream" and "external" package tracking.  Things like
+    dictionaries should be tracked at their sources for updates.
+    If you're going to have that capability, then why not the
+    capability to do this for arbitrary packages?
+12. If you're going to be automatically running off to do external
+    package tracking, then automate sending the local dictionary to
+    Jim Breen.  

File dui-registry.el

 
 ;; Author:      Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp>
 ;; Keywords:    mule, dictionary
-;; Version:     0.5
+;; Version:     0.6
 
 ;;   This file is part of XEmacs.
 
 
 The entry is formatted for EDICT, and edict-edit-mode is entered.")
 
-(dui-princ-errors)
+;(dui-princ-errors)
 
 (provide 'dui-registry)
 
 
 ;; Author:      Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp>
 ;; Keywords:    mule, dictionary
-;; Version:     0.5
+;; Version:     0.6
 
 ;;   This file is part of XEmacs.
 
 ;;
 (or dl-mode-submap
     (progn
-     (setq dl-mode-submap (make-sparse-keymap))
-     (define-prefix-command 'dl-mode-submap 'dl-mode-submap)
-     (define-key dl-mode-submap ?s 'dui-invoke-search-method)
-     (define-key dl-mode-submap ?i 'dui-invoke-insert-method)
+     (define-prefix-command 'dl-mode-submap) ;
+     (define-key dl-mode-submap '[ ?s ] 'dui-invoke-search-method)
+     (define-key dl-mode-submap '[ ?i ] 'dui-invoke-insert-method)
      ;; Hmm ... I don't think there are any of these :-P
-     ;;(define-key dl-mode-submap ?e 'dui-invoke-edit-method)
-     (define-key dl-mode-submap ?d 'dui-describe-method)
+     ;;(define-key dl-mode-submap '[ ?e ] 'dui-invoke-edit-method)
+     (define-key dl-mode-submap '[ ?d ] 'dui-describe-method)
      ))
 
 ;; Helper functions
 keymaps.  Maps of inactive minor modes and local maps major modes of
 other buffers will not be searched (although the latter will be shadowed
 since dl-mode is a global variable)."
-  (let ((found 0))
-    (if (> dl-warn-conflict-verbosity 1)
-	(progn
-	  (message "Checking for conflicting bindings...")
-	  (if (> dl-warn-conflict-verbosity 2)
-	      (message "Examining accessible maps of map:\n    `%s'" map))))
-    ;; A map is accessible from itself
-    (mapcar (lambda (slot)
-	      (let ((prefix (car slot))
-		    (map (cdr slot)))
-		(if (> dl-warn-conflict-verbosity 2)
-		    (message "Examining keys of map:\n    `%s'" map))
-		(map-keymap (lambda (key binding)
-			      (let* ((key (vconcat prefix (vector key)))
-				     (binding (key-binding key)))
-				(if (and binding
-					 (> dl-warn-conflict-verbosity 0))
-				    (progn
-				      (if (not (keymapp binding))
-					  (setq found (1+ found)))
-				      (message dl-conflict-warning
-					       key binding)))))
-			    map)))
-	    (accessible-keymaps map))
-    (if (> dl-warn-conflict-verbosity 1)
-	(message "Checking for conflicting bindings...done%s"
-		 (if (> found 0)
-		     (format ".  Found %d." found)
-		   ".")))))
+  (if (null (featurep 'xemacs))
+      ;; `map-keymap' doesn't exist in the FSF's Emacs
+      (message "Keymap shadow checking not supported under\n%s"
+	       (emacs-version))
+    (let ((found 0))
+      (if (> dl-warn-conflict-verbosity 1)
+	  (progn
+	    (message "Checking for conflicting bindings...")
+	    (if (> dl-warn-conflict-verbosity 2)
+		(message "Examining accessible maps of map:\n    `%s'" map))))
+      ;; A map is accessible from itself
+      (mapcar (lambda (slot)
+		(let ((prefix (car slot))
+		      (map (cdr slot)))
+		  (if (> dl-warn-conflict-verbosity 2)
+		      (message "Examining keys of map:\n    `%s'" map))
+		  (map-keymap (lambda (key binding)
+				(let* ((key (vconcat prefix (vector key)))
+				       (binding (key-binding key)))
+				  (if (and binding
+					   (> dl-warn-conflict-verbosity 0))
+				      (progn
+					(if (not (keymapp binding))
+					    (setq found (1+ found)))
+					(message dl-conflict-warning
+						 key binding)))))
+			      map)))
+	      (accessible-keymaps map))
+      (if (> dl-warn-conflict-verbosity 1)
+	  (message "Checking for conflicting bindings...done%s"
+		   (if (> found 0)
+		       (format ".  Found %d." found)
+		     "."))))))
 
-;; Register the mode with XEmacs
-;;
-(add-minor-mode 'dl-mode
-		dl-indicator-string
-		(dl-mode-set-prefix dl-mode-prefix 'adding-minor-mode))
+;; Register the mode with Emacs
+;; `add-minor-mode' doesn't exist in Emacs 20.2  :-(
+(or (assq 'dl-mode minor-mode-alist)
+    (setq minor-mode-alist
+	  (cons (list 'dl-mode dl-indicator-string) minor-mode-alist)))
+(dl-mode-set-prefix dl-mode-prefix)
 
 ;;; end of dictionary lookup minor mode
 

File edict-dot-emacs-oda

-
-
-;;;; edict.el stuff
-(autoload 'edict-search-english "edict" "Search for a translation of an
-English word")
-(global-set-key "\e*" 'edict-search-english)
-(autoload 'edict-search-kanji "edict" "Search for a translation of a Kanji
-sequence")
-(global-set-key "\e_" 'edict-search-kanji)
-(autoload 'edict-insert "edict" "Insert the last translation")
-(global-set-key "\e+" 'edict-insert)
-(setq *edict-files*  '("/usr/lib/dict/edict"))
-
-(setq *edict-private-file* "~/.private-edict")
-

File edict-edit.el

 
 ;; Author:      Per Hammarlund <perham@nada.kth.se>
 ;; Keywords:    mule, edict, dictionary
-;; Version:     0.9.7
+;; Version:     0.9.8
 ;; Adapted-by:  Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp> for XEmacs
 ;; Maintainer:  Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp>
 
 
 ;;; Code:
 
-(provide 'edict-edit)
+(require 'cl)
 
 ;;; Customizable variables
 
 		    (define-key edict-edit-mode-map key 'edict-standin))
 		  edict-edit-mode-map)
     (dotimes (i 128)
-      ;; I don't know how to invoke multi-char commands, so don't hook
-      ;; those.
-      (unless (consp (aref edict-edit-mode-map i))
-	(setf (aref edict-edit-mode-map i) 'edict-standin))))
+      ;; #### I hope this is OK without the check below
+      (define-key edict-edit-mode-map [ i ] 'edict-standin)))
+; Emacs 18?
+;      ;; I don't know how to invoke multi-char commands, so don't hook
+;      ;; those.
+;      (unless (consp (aref edict-edit-mode-map i))
+;	(setf (aref edict-edit-mode-map i) 'edict-standin))))
   (if (featurep 'xemacs)
       (progn
 	(define-key edict-edit-mode-map [(control c)] nil)
 	(define-key edict-edit-mode-map [(control x)] nil)
 	(define-key edict-edit-mode-map [(escape)] nil))
-    (setf (aref edict-edit-mode-map 3) nil
-	  (aref edict-edit-mode-map 24) nil
-	  (aref edict-edit-mode-map 27) nil))
+    (define-key edict-edit-mode-map [ 3 ] nil)
+    (define-key edict-edit-mode-map [ 24 ] nil)
+    (define-key edict-edit-mode-map [ 27 ] nil))
+; Emacs 18?
+;    (setf (aref edict-edit-mode-map 3) nil
+;	  (aref edict-edit-mode-map 24) nil
+;	  (aref edict-edit-mode-map 27) nil))
   (define-key edict-edit-mode-map "\C-c\C-c" 'edict-exit)
   (define-key edict-edit-mode-map "\C-x\C-s" 'edict-exit)
   (define-key edict-edit-mode-map "\t" 'edict-tab)
 			   (edict-clean-up-kanji (buffer-substring min max))
 			   nil nil))
 
+(provide 'edict-edit)
+
 ;;; edict-edit.el ends here

File edict-english.el

 
 ;; Author:      Per Hammarlund <perham@nada.kth.se>
 ;; Keywords:    mule, edict, dictionary
-;; Version:     0.9.7
+;; Version:     0.9.8
 ;; Adapted-by:  Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp> for XEmacs
 ;; Maintainer:  Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp>
 

File edict-japanese.el

 
 ;; Author:      Per Hammarlund <perham@nada.kth.se>
 ;; Keywords:    mule, edict, dictionary
-;; Version:     0.9.7
+;; Version:     0.9.8
 ;; Adapted-by:  Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp> for XEmacs
 ;; Maintainer:  Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp>
 

File edict-morphology.el

 
 ;; Author:      Per Hammarlund <perham@nada.kth.se>
 ;; Keywords:    mule, edict, dictionary
-;; Version:     0.9.7
+;; Version:     0.9.8
 ;; Adapted-by:  Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp> for XEmacs
 ;; Maintainer:  Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp>
 
 
 ;;; Code:
 
-(provide 'edict-morphology)
+(require 'cl)				; for defstruct
 
 ;;; Constants:
 
 ;	(setq result (cons frob result))))
 ;    result))
 
+(provide 'edict-morphology)
+
 ;;; edict-morphology.el ends here

File edict-test.el.096

+;;;;;; Copyright (C) 1992 Bob Kerns <rwk@crl.dec.com>
+;;;
+;;;
+;;;   This program is free software; you can redistribute it and/or modify
+;;;   it under the terms of the GNU General Public License as published by
+;;;   the Free Software Foundation; either version 1, or (at your option)
+;;;   any later version.  ;;; 
+;;;   This program is distributed in the hope that it will be useful,
+;;;   but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;   GNU General Public License for more details.  ;;; 
+;;;   You should have received a copy of the GNU General Public License
+;;;   along with this program; if not, write to the Free Software
+;;;   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  ;;; 
+
+;;; Test suite for morphology rules for edict.el.
+;;; To run the tests, load this file, and do m-X edict-perform-tests.
+;;; This will create an *EDICT-TESTS* buffer with the results.
+
+
+(require 'cl)
+
+;;; This should exist, but doesn't.  See edict.install for the
+;;; compiler half of this.  You should be sure to load the same
+;;; hacks into your compiler if you compile this by hand, or you
+;;; won't get it byte compiled.
+
+(defmacro eval-when (when &rest forms)
+  (and (or (member 'eval when)
+	    (member ':execute when))
+       (mapcar (function eval) forms))
+  (and (or (member 'load when)
+	   (member ':load-toplevel when))
+       (cons 'progn forms)))
+
+;;; first, a couple simple tests.
+
+(defun edict-test-string (flag string)
+  "Show what strings will be searched for a test string.  If given a prefix arg,
+traces step by step; type Return for each new step."
+  (interactive "P
+sTest string: ")
+  (let ((*edict-expand-string-trace* flag))
+    (message (format "%s" (edict-expand-string string)))))
+
+(defun edict-test-rule (rule-name string)
+  (interactive "SRule name: 
+sTest string: ")
+  (let ((rule (edict-get-rule rule-name)))
+    (unless rule (error "There is no rule named '%s'" rule-name))
+    (unless (string-match (edict-rule-pattern rule) string)
+      (error "The rule %s does not match '%s'." rule-name string))
+    (apply (edict-rule-function rule) string
+	   (edict-rule-additional-args rule))))
+
+(eval-when (eval load compile)
+(defstruct edict-test
+  word					; Word to be tested.
+  should-have				; Expansions that should be found
+  should-not-have			; Expansions that should not be found.
+  from-syntax-types
+  to-syntax-types)
+)
+
+(defvar *edict-tests* nil)
+
+(defun remove-edict-test (name)
+  (let ((test (get-edict-test name)))
+    (setq *edict-tests* (delq test *edict-tests*))))
+
+(defun add-edict-test (test)
+  ;; Preserve the order of the tests.
+  (let* ((name (edict-test-word test))
+	 (old (get-edict-test name)))
+    (if old
+	(setf (edict-test-should-have old) (edict-test-should-have test)
+	      (edict-test-should-not-have old) (edict-test-should-not-have test)
+	      (edict-test-from-syntax-types old)
+	      (edict-test-from-syntax-types test)
+	      (edict-test-to-syntax-types old)
+	      (edict-test-to-syntax-types test))
+      (setq *edict-tests* (append *edict-tests* (list test))))))
+
+(defun get-edict-test (name)
+  (if (symbolp name)
+      (setq name (symbol-name name)))
+  (catch 'found-it
+    (dolist (test *edict-tests*)
+      (if (equal (edict-test-word test) name)
+	  (throw 'found-it test)))))
+
+(defmacro deftest (case &optional fromto should-have should-not-have not-self)
+  (` (define-edict-test '(, case) '(, (first fromto)) '(, (second fromto))
+       '(, should-have) '(, should-not-have) '(, not-self))))
+
+(defun define-edict-test (name from to should-have should-not-have
+			       &optional not-self)
+  (if (symbolp name)
+      (setq name (symbol-name name)))
+  (unless (listp from)
+    (setq from (list from)))
+  (unless (listp to)
+    (setq to (list to)))
+  (unless from
+    (setq from '($@F|K\8l(J)))
+  (let ((f (function (lambda (x)
+		       (if (symbolp x)
+			   (symbol-name x)
+			 x)))))
+    (setq should-have (mapcar f should-have))
+    (setq should-not-have (mapcar f should-not-have))
+    (or not-self (edict-find name should-have)
+	(push name should-have))
+    (add-edict-test (make-edict-test :word name
+				     :should-have should-have
+				     :should-not-have should-not-have
+				     :from-syntax-types from
+				     :to-syntax-types to)))
+  name)
+
+;;; This should be in emacs, but it isn't.
+;;; (Borrowed from ilisp.el, where I inherited it accidentally).
+
+(defun edict-del (item list &optional test)
+  "Delete ITEM from LIST using TEST comparison and return the result.
+Default test is equal."
+  (let ((test (or test (function equal)))
+	(element list)
+	(prev nil)
+	(done nil))
+    (while (and element (not done))
+      (if (funcall test item (car element))
+	  (progn
+	    (setq done t)
+	    (if prev
+		(rplacd prev (cdr element))
+		(setq list (cdr list))))
+	  (setq prev element
+		element (cdr element))))
+    list))
+
+
+(defun edict-test (test)
+  (if (or (symbolp test) (stringp test))
+      (setq test (get-edict-test test)))
+  ;; Cleaning up the kanji shouldn't break anything;
+  ;; give it a chance to do so if it's buggy.
+  (let* ((name (edict-test-word test))
+	 (word (edict-clean-up-kanji name))
+	 (from-syntax-types (edict-test-from-syntax-types test))
+	 (to-syntax-types (edict-test-to-syntax-types test))
+	 (should-have (edict-test-should-have test))
+	 (should-not-have (edict-test-should-not-have test)))
+    (let ((expansion (edict-expand-string-syntaxes word () () from-syntax-types))
+	  (failed nil))
+      (dolist (sh should-have)
+	(if (edict-find sh expansion)
+	    (setq expansion (edict-del sh expansion (function equal)))
+	  (progn 
+	    (princ (format ";%s: did not produce %s\n" name sh))
+	    (setq failed t))))
+      (dolist (case should-not-have)
+	(and (edict-find case expansion)
+	     (progn
+	       (princ (format ";%s: Should not have %s as expansion.\n"
+			      name case))
+	       (setq failed t)
+	       (setq expansion (edict-del sh expansion (function equal))))))
+      (dolist (bad expansion)
+	(princ (format ";%s: Unexpected expansion: %s\n" name bad))
+	(setq failed t))
+      (or failed
+	  (princ (format ";%s: OK\n" name)))
+      (not failed))))
+
+(defun edict-perform-tests ()
+  (interactive)
+  (let ((test-buffer (get-buffer-create "*EDICT-TESTS*"))
+	(failures 0)
+	(first-failure nil))
+    (set-buffer test-buffer)
+    (set-window-buffer (selected-window) test-buffer)
+    (delete-region (point-min) (point-max))
+    (let ((standard-output test-buffer))
+      (dolist (test *edict-tests*)
+	(let ((msg-point (point)))
+	  (cond ((not (edict-test test))
+		 (incf failures)
+		 (or first-failure (setq first-failure msg-point))))
+	  (sit-for 0))))
+    (cond ((= failures 0)
+	   (message "Done.  All Tests OK."))
+	  ((= failures 1)
+	   (message "1 test failed."))
+	  (t (message (format "%d tests failed." failures))))
+    (goto-char (or first-failure (point-min)))))
+
+(defun edict-run-test (arg)
+  "Execute the test that point is in or before.
+Print value in minibuffer.
+With argument, insert value in current buffer after the defun.
+With argument >= 16 (i.e. c-U c-U), single-step through the expansion process."
+  (interactive "P")
+  (save-excursion
+    (end-of-defun)
+    (let ((end (point))
+	  (*edict-expand-string-trace* (and arg (> (prefix-numeric-value arg) 4))))
+      (beginning-of-defun)
+      (let* ((test-form (read (current-buffer)))
+	     (test-name (second test-form))
+	     (test))
+	(eval test-form)
+	(setq test (get-edict-test test-name))
+	(forward-line 1)
+	(while (looking-at (concat ";" (symbol-name test-name)
+				   ": \\(Unexpected expansion: \\|did not produce \\|OK$\\)"))
+	  (let ((start (point)))
+	    (forward-line 1)
+	    (delete-region start (point))))
+	(let ((standard-output (if arg (current-buffer) standard-output)))
+	  (edict-test test)))))
+  t)
+
+;(global-set-key "\e_" 'edict-run-test)
+
+;;; **** NOTE WELL ****
+;;; The proper test results here are not necessarily valid words.
+;;; These are words which are MORPHOLOGICALLY correct.  That is,
+;;; this reverse-chains on the possible rules to produce a given
+;;; word, generally only one or two of which would actually be
+;;; correct.
+
+;;; Also note that these are regression tests.  No distinction is being
+;;; made between results which are "correct" and results which are
+;;; "acceptable".  In general, we accept spurious expansions if they
+;;; lead to including desirable results in other cases.  Modifying the
+;;; rule set may either result in eliminating spurious expansions (resulting
+;;; in missing expansions from the tests) or adding new spurious expansions.
+;;; In case of problems from these tests, the offending test should be single-stepped
+;;; (with c-u c-u m-X edict-run-test), and the reasons for the expansion should be
+;;; evaluated.  If, after careful consideration, the modified result is regarded
+;;; as correct, the test should be modified accordingly.  Otherwise, the bug should
+;;; be fixed.
+
+;;; Be careful.  Regression tests are good for considering all the effects of
+;;; a change, but they do not themselves determine the correctness of a change.
+;;; When the regression tests determine that something has changed, it is up
+;;; to YOU to be careful and determine the correct result.
+
+(deftest "$@Gc$&(J "
+  ()
+  ($@Gc$&(J)
+  ()
+  :not-self)
+
+(deftest "
+$@!d!!Gc!t(J#>!$@!*!'(J:$@$&(J	 "
+  ()
+  ($@Gc$&(J)
+  ()
+  :not-self)
+
+;;; The basics: $@8^CJF0;l(J
+(deftest $@Gc$&(J
+  ())
+(deftest $@9T$/(J
+  ()
+  ($@9T$$(J))				;Looks like it could be an adverb
+;$@9T$/(J: OK
+(deftest $@1K$0(J
+  ())
+(deftest $@OC$9(J
+  ())
+(deftest $@BT$D(J
+  ())
+(deftest $@;`$L(J
+  ())
+(deftest $@8F$V(J
+  ())
+(deftest $@FI$`(J
+  ())
+(deftest $@J,$+$k(J
+  ())
+(deftest $@@.$k(J
+  ())
+;;; $@0lCJF0;l(J
+(deftest $@@8$-$k(J
+  ())
+(deftest $@8+$k(J
+  ())
+
+;;; Distal style
+;;; These all produce the improbable but possible result of removing only the
+;;; masu and adding $@$k(J as if it were a $@0lCJF0;l(J, since the result of that situation
+;;; would look the same.
+
+(deftest $@Gc$$$^$9(J
+  ()
+  ($@Gc$&(J $@Gc$$$k(J))
+(deftest $@CV$-$^$9(J
+  ()
+  ($@CV$/(J $@CV$-$k(J))
+;$@CV$-$^$9(J: OK
+(deftest $@1K$.$^$9(J
+  ()
+  ($@1K$0(J $@1K$.$k(J))
+(deftest $@OC$7$^$9(J
+  ()
+  ($@OC$9(J $@OC$7$k(J $@OC$9$k(J $@OC(J))
+(deftest $@;}$A$^$9(J
+  ()
+  ($@;}$D(J $@;}$A$k(J))
+(deftest $@;`$K$^$9(J
+  ()
+  ($@;`$L(J $@;`$K$k(J))
+(deftest $@8F$S$^$9(J
+  ()
+  ($@8F$V(J $@8F$S$k(J))
+(deftest $@FI$_$^$9(J
+  ()
+  ($@FI$`(J $@FI$_$k(J))
+(deftest $@J,$+$j$^$9(J
+  ()
+  ($@J,$+$k(J $@J,$+$j$k(J))
+(deftest $@@.$j$^$9(J
+  ()
+  ($@@.$k(J $@@.$j$k(J))
+(deftest $@@8$-$^$9(J
+  ()
+  ($@@8$-$k(J $@@8$/(J))
+;$@@8$-$^$9(J: OK
+(deftest $@8+$^$9(J
+  ()
+  ($@8+$k(J))
+
+
+;;; Irregulars
+
+(deftest $@Mh$^$9(J
+  ()
+  ($@Mh$k(J))
+(deftest $@$-$^$9(J
+  ()
+  ($@$/$k(J $@$-$k(J))
+(deftest $@$7$^$9(J
+  ()
+  ($@$9$k(J $@$7$k(J))
+
+(deftest $@Gc$$$^$;$s(J
+  ()
+  ($@Gc$&(J $@Gc$$$k(J))
+(deftest $@CV$-$^$;$s(J
+  ()
+  ($@CV$/(J $@CV$-$k(J))
+;$@CV$-$^$;$s(J: OK
+(deftest $@1K$.$^$;$s(J
+  ()
+  ($@1K$0(J $@1K$.$k(J))
+(deftest $@OC$7$^$;$s(J
+  ()
+  ($@OC$9(J $@OC$7$k(J $@OC$9$k(J $@OC(J))
+(deftest $@;}$A$^$;$s(J
+  ()
+  ($@;}$D(J $@;}$A$k(J))
+(deftest $@;`$K$^$;$s(J
+  ()
+  ($@;`$L(J $@;`$K$k(J))
+(deftest $@8F$S$^$;$s(J
+  ()
+  ($@8F$V(J $@8F$S$k(J))
+(deftest $@FI$_$^$;$s(J
+  ()
+  ($@FI$`(J $@FI$_$k(J))
+(deftest $@J,$+$j$^$;$s(J
+  ()
+  ($@J,$+$k(J $@J,$+$j$k(J))
+(deftest $@@.$j$^$;$s(J
+  ()
+  ($@@.$k(J $@@.$j$k(J))
+(deftest $@@8$-$^$;$s(J
+  ()
+  ($@@8$-$k(J $@@8$/(J))
+;$@@8$-$^$;$s(J: OK
+(deftest $@8+$^$;$s(J
+  ()
+  ($@8+$k(J))
+
+
+;;; Irregulars
+
+(deftest $@Mh$^$;$s(J
+  ()
+  ($@Mh$k(J))
+(deftest $@$-$^$;$s(J
+  ()
+  ($@$/$k(J $@$-$k(J))
+(deftest $@$7$^$;$s(J
+  ()
+  ($@$9$k(J $@$7$k(J))
+
+
+;;; Past tense
+
+(deftest $@Gc$C$?(J
+  ()
+  ($@Gc$&(J $@Gc$D(J $@Gc$k(J))
+(deftest $@CV$$$?(J
+  ()
+  ($@CV$/(J $@CV$$$k(J))
+;$@CV$$$?(J: OK
+(deftest $@9T$C$?(J
+					();iku is irregular It looks like a $@$k(J/$@$D(J/$@$&(J.
+  ($@9T$/(J $@9T$$(J $@9T$&(J $@9T$D(J $@9T$k(J))
+;$@9T$C$?(J: OK
+(deftest $@OC$7$?(J
+  ()
+  ($@OC$9(J $@OC$7$k(J $@OC$9$k(J $@OC(J))
+;$@OC$7$?(J: OK
+(deftest $@;}$C$?(J
+  ()
+  ($@;}$D(J $@;}$&(J $@;}$k(J))
+(deftest $@;`$s$?(J
+					();Don't mis-interpret
+  ()
+  ($@;`$L(J))
+(deftest $@;`$s$@(J
+  ()
+  ($@;`$L(J $@;`$V(J $@;`$`(J $@;`$s(J))
+;$@;`$s$@(J: OK
+(deftest $@8F$s$@(J
+  ()
+  ($@8F$V(J $@8F$`(J $@8F$L(J $@8F$s(J))
+;$@8F$s$@(J: OK
+(deftest $@FI$s$@(J
+  ()
+  ($@FI$`(J $@FI$L(J $@FI$V(J $@FI$s(J))
+;$@FI$s$@(J: OK
+(deftest $@J,$+$C$?(J
+  ()
+  ($@J,$+$k(J $@J,$$(J $@J,$+$&(J $@J,$+$D(J))
+;$@J,$+$C$?(J: OK
+(deftest $@@.$C$?(J
+  ()
+  ($@@.$k(J $@@.$&(J $@@.$D(J))
+;;; $@0lCJF0;l(J
+(deftest $@@8$-$?(J
+  ()
+  ($@@8$-$k(J $@@8$/$k(J))
+;$@@8$-$?(J: OK
+(deftest $@8+$?(J
+  ()
+  ($@8+$k(J))
+
+;;; Gerund
+;;; These all also map to $@$D(J, because of the plan imperative form.
+;;; This seems surprising, if you're not thinking about it.
+
+(deftest $@Gc$C$F(J
+  ()
+  ($@Gc$&(J $@Gc$D(J $@Gc$k(J $@Gc$C$D(J $@Gc$C$F$k(J))
+;$@Gc$C$F(J: OK
+(deftest $@CV$$$F(J
+  ()
+  ($@CV$/(J $@CV$$$k(J $@CV$$$D(J $@CV$$$F$k(J))
+;$@CV$$$F(J: OK
+(deftest $@9T$C$F(J
+					();iku is irregular It looks like a $@$k(J/$@$D(J/$@$&(J.
+  ($@9T$/(J $@9T$$(J $@9T$&(J $@9T$D(J $@9T$k(J $@9T$C$D(J $@9T$C$F$k(J))
+;$@9T$C$F(J: OK
+(deftest $@OC$7$F(J
+  ()
+  ($@OC$9(J $@OC$7$k(J $@OC$7$D(J $@OC$9$k(J $@OC(J $@OC$7$F$k(J))
+;$@OC$7$F(J: OK
+(deftest $@;}$C$F(J
+  ()
+  ($@;}$D(J $@;}$&(J $@;}$k(J $@;}$C$D(J $@;}$C$F$k(J))
+;$@;}$C$F(J: OK
+(deftest $@;`$s$F(J
+					();Don't mis-interpret
+  ($@;`$s$D(J $@;`$s$F$k(J)
+  ($@;`$L(J))
+;$@;`$s$F(J: OK
+(deftest $@;`$s$G(J
+  ()
+  ($@;`$L(J $@;`$V(J $@;`$`(J))
+;$@;`$s$G(J: OK
+(deftest $@8F$s$G(J
+  ()
+  ($@8F$V(J $@8F$`(J $@8F$L(J))
+;$@8F$s$G(J: OK
+(deftest $@FI$s$G(J
+  ()
+  ($@FI$`(J $@FI$L(J $@FI$V(J))
+(deftest $@J,$+$C$F(J
+  ()
+  ($@J,$+$k(J $@J,$+$&(J $@J,$+$D(J $@J,$+$C$D(J $@J,$+$C$F$k(J))
+;$@J,$+$C$F(J: OK
+(deftest $@@.$C$F(J
+  ()
+  ($@@.$k(J $@@.$&(J $@@.$D(J $@@.$C$D(J $@@.$C$F$k(J))
+;$@@.$C$F(J: OK
+;;; $@0lCJF0;l(J
+(deftest $@@8$-$F(J
+  ()
+  ($@@8$-$k(J $@@8$-$D(J $@@8$/$k(J $@@8$-$F$k(J))
+;$@@8$-$F(J: OK
+(deftest $@8+$F(J
+  ()
+  ($@8+$k(J $@8+$D(J $@8+$F$k(J))
+;$@8+$F(J: OK
+
+;;; Potential
+
+(deftest $@Gc$($k(J
+  ()
+  ($@Gc$&(J))
+;$@Gc$($k(J: OK
+
+(deftest $@?)$Y$i$l$k(J
+  ()
+  ($@?)$Y$k(J $@?)$Y$i$k(J $@?)$V(J))
+;$@?)$Y$i$l$k(J: OK
+
+(deftest $@8F$Y$k(J
+  ()
+  ($@8F$V(J))
+;$@8F$Y$k(J: OK
+
+;;; Passive
+;;; These also look like they could be $@0lCJ$I$&$7(J potentials.
+
+(deftest $@Gc$o$l$k(J
+  ()
+  ($@Gc$&(J $@Gc$o$k(J))
+;$@Gc$o$l$k(J: OK
+
+(deftest $@CV$+$l$k(J
+  ()
+  ($@CV$/(J $@CV$+$k(J))
+;$@CV$+$l$k(J: OK
+
+(deftest $@1K$,$l$k(J
+  ()
+  ($@1K$0(J $@1K$,$k(J))
+(deftest $@OC$5$l$k(J
+  ()
+  ($@OC$9(J $@OC$9$k(J $@OC$5$k(J $@OC(J))		;Because of irregular $@$9$k(J
+(deftest $@BT$?$l$k(J
+  ()
+  ($@BT$D(J $@BT$?$k(J))
+(deftest $@;`$J$l$k(J
+  ()
+  ($@;`$L(J $@;`$J$k(J))
+(deftest $@FI$^$l$k(J
+  ()
+  ($@FI$`(J $@FI$^$k(J))
+;$@FI$^$l$k(J: OK
+(deftest $@8F$P$l$k(J
+  ()
+  ($@8F$V(J $@8F$P$k(J))
+(deftest $@8+$i$l$k(J
+  ()
+  ($@8+$k(J $@8+$i$k(J))
+
+;;; Irregulars
+(deftest $@Mh$i$l$k(J
+  ()
+  ($@Mh$k(J $@Mh$i$k(J))
+(deftest $@$5$l$k(J
+  ()
+  ($@$9$k(J $@$5$k(J $@$9(J))			;$@$9(J because of the regular rule.
+
+;;; Causitive
+
+(deftest $@Gc$o$;$k(J
+  ()
+  ($@Gc$&(J $@Gc$o$9(J))
+;$@Gc$o$;$k(J: OK
+(deftest $@CV$+$;$k(J
+  ()
+  ($@CV$/(J $@CV$+$9(J))
+;$@CV$+$;$k(J: OK
+(deftest $@1K$,$;$k(J
+  ()
+  ($@1K$0(J $@1K$,$9(J))
+;$@1K$,$;$k(J: OK
+(deftest $@OC$5$;$k(J
+  ()
+  ($@OC$k(J $@OC$9(J $@OC$9$k(J $@OC$5$9(J $@OC(J))		;Because of irregular $@$9$k(J
+;$@OC$5$;$k(J: OK
+(deftest $@BT$?$;$k(J
+  ()
+  ($@BT$D(J $@BT$?$9(J))
+;$@BT$?$;$k(J: OK
+(deftest $@;`$J$;$k(J
+  ()
+  ($@;`$L(J $@;`$J$9(J))
+;$@;`$J$;$k(J: OK
+(deftest $@FI$^$;$k(J
+  ()
+  ($@FI$`(J $@FI$^$9(J))
+;$@FI$^$;$k(J: OK
+(deftest $@8F$P$;$k(J
+  ()
+  ($@8F$V(J $@8F$P$9(J))
+;$@8F$P$;$k(J: OK
+(deftest $@8+$5$;$k(J
+  ()
+  ($@8+$k(J $@8+$9(J $@8+$9$k(J $@8+$5$9(J $@8+(J))		;Because of regular & irregular rules
+;$@8+$5$;$k(J: OK
+
+;;; Irregulars
+(deftest $@Mh$5$;$k(J
+  ()
+  ($@Mh$k(J $@Mh$9(J $@Mh$9$k(J $@Mh$5$9(J $@Mh(J))		;because of regular & irregular rules.
+;$@Mh$5$;$k(J: OK
+(deftest $@$5$;$k(J
+  ()
+  ($@$9$k(J $@$5$9(J $@$9(J))			;$@$9(J because of the regular rule.
+;$@$5$;$k(J: OK
+
+;;; Conditional
+
+(deftest $@Gc$($P(J
+  ()
+  ($@Gc$&(J))
+(deftest $@CV$1$P(J
+  ()
+  ($@CV$/(J))
+(deftest $@1K$2$P(J
+  ()
+  ($@1K$0(J))
+(deftest $@OC$;$P(J
+  ()
+  ($@OC$9(J))
+(deftest $@BT$F$P(J
+  ()
+  ($@BT$D(J))
+(deftest $@;`$M$P(J
+  ()
+  ($@;`$L(J))
+(deftest $@FI$a$P(J
+  ()
+  ($@FI$`(J))
+(deftest $@8F$Y$P(J
+  ()
+  ($@8F$V(J))
+(deftest $@8+$l$P(J
+  ()
+  ($@8+$k(J))
+
+;;; $@$?$i(J conditional form
+
+(deftest $@Gc$C$?$i(J
+  ()
+  ($@Gc$&(J $@Gc$D(J $@Gc$k(J))
+(deftest $@CV$$$?$i(J
+  ()