Commits

stephent  committed 60fcf76

This patch adds Customize-ability and a primitive update-dictionary
function to edict, as well making making a large number of small
cosmetic improvements.
<87bsfaq1v1.fsf@tleeps18.sk.tsukuba.ac.jp>

  • Participants
  • Parent commits 5ba6018

Comments (0)

Files changed (15)

+2002-01-30  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* edict-english.el:
+	* edict-japanese.el:
+	* edict.el:
+	Update version to 0.9.9.
+
+	* README:
+	* TODO:
+	* edict.el:
+	Change a couple of `FSF's to `GNU's.
+
+	* edict.el (edict-dictionary-path): Correct Customize initialization.
+
+	* Makefile (DATA_FILES): Add the 0.9.6 docs per README.
+
+2002-01-29  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* README: Update copyrights, version, create NEWS section.
+
+	* edict-edit.el: 
+	* edict-morphology.el:
+	Update version and copyrights (especially Bob Kerns).
+
+	* Makefile (EXTRA_SOURCES): Add Makefile.GNU so GNU Emacs users
+	can use the bindist package.
+	(DATA_FILES): Add README.
+
+	* edict-update.el (edict-update): Implement.  Improve docstring.
+
+	* edict.el (edict-dictionary-path): Fix docstring and Customize type.
+
+2002-01-28  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* dui.el (dl-indicator-string): Renamed to dl-mode-line-string.
+	(dl-mode-line-string): New name for dl-indicator-string.
+
+	(dui-method-alist): 
+	(dl-mode-hook): 
+	(dl-mode-prefix):
+	Conform to * convention for user variables.
+
+	(dl): New group.
+	(dl-mode-line-string): 
+	(dl-conflict-warning):
+	(dl-warn-conflict-verbosity):
+	(dui-warn-previously-registered-methods-p):
+	Easy Customizations done.
+
+	* edict-edit.el (*brackets-allowed-in-english*):
+	(edict-verbose-electric-henkan):
+	(edict-use-electric-henkan):
+	Easy Customizations done.
+
+	* edict-morphology.el (*edict-expand-string-trace*): Move to top.
+
+	* ts-mode.el (ts-mode-prefix):
+	(ts-mode-hook):
+	Conform to * convention for user variables.
+
+	(ts-conflict-warning):
+	(ts-warn-conflict-verbosity):
+	Easy Customizations done.
+
+2002-01-27  Stephen J. Turnbull  <stephen@xemacs.org>
+
+	* Makefile: Add copyright notice and update email address.
+
+	(ELCS):
+	(DATA_FILES):
+	edictj.demo is data, not source.
+
+	(GENERATED):
+	(all):
+	Handle custom-load.el.
+
+	* dui.el:
+	* dui-registry.el:
+	* edict-edit.el:
+	* edict-english.el:
+	* edict-japanese.el:
+	* edict-morphology.el:
+	* ts-mode.el:
+	Update copyright notice and email address.
+
+	* edict.el: Update Commentary, copyright notice, email address.
+
+	(edict-match-buffer): Add docstring.
+
+	(edict): New Custom group.
+	(edict-default-coding-system): 
+	(edict-user-dictionary): 
+	(edict-dictionary-path): 
+	(edict-dictionaries): 
+	(edict-buffer-name): 
+	(edict-match-buffer-name): 
+	(edict-warn-missing-dictionaries-p): 
+	(*edict-window-location*):
+	Customize.
+
+	(*edict-romaji-remaps*): Initialize, not setq; defvar -> defconst.
+
+	(edict-version-date):
+	(edict-version):
+	(*edict-file-begin-marker*):
+	(*edict-file-end-marker*):
+	(*edict-kanji-whitespace*): 
+	(*edict-eigo-whitespace*): 
+	(*edict-unreadable-error*): 
+	(*edict-unreadable-error*): 
+	Change defvars to defconsts.
+
+	* edict-update.el: New file.
+	(edict-update): New custom group.
+
+	* Makefile.GNU: Renamed from Makefile.FSF.
+
 2000-11-08  Steve Youngs  <youngs@xemacs.org>
 
 	* package-info.in (description): Add "MULE" to description.
 # Makefile for Edict
 
+# Copyright (C) 1998, 2002 Free Software Foundation, Inc.
+
 # This file is part of XEmacs.
 
 # XEmacs is free software; you can redistribute it and/or modify it
 # Boston, MA 02111-1307, USA.
 
 VERSION = 1.12
-AUTHOR_VERSION = 0.9.8
-MAINTAINER = Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp>
+AUTHOR_VERSION = 0.9.9
+MAINTAINER = Stephen J. Turnbull <stephen@xemacs.org>
 PACKAGE = edict
 PKG_TYPE = regular
 REQUIRES = mule-base xemacs-base
 CATEGORY = mule
 
-EXTRA_SOURCES = edictj.demo ts-mode.el
+ELCS = edict.elc dui.elc edict-morphology.elc edict-japanese.elc \
+       edict-english.elc edict-edit.elc edict-update.elc \
+       edict-test.elc dui-registry.elc
 
-ELCS = edict.elc dui.elc edict-morphology.elc edict-japanese.elc \
-       edict-english.elc edict-edit.elc edict-test.elc dui-registry.elc
+EXTRA_SOURCES = ts-mode.el Makefile.GNU
+DATA_FILES = edictj.demo README \
+             ChangeLog.096 README.096 edict.doc.096
+DATA_DEST = $(PACKAGE)
 
 COMPATIBILITY_FLAGS = -eval "(setq byte-compile-print-gensym nil)"
 
 include ../../XEmacs.rules
 
+GENERATED += custom-load.elc
+
 ifeq ($(BUILD_WITHOUT_MULE),)
 
-all:: $(ELCS) auto-autoloads.elc
+all:: auto-autoloads.elc $(ELCS) custom-load.elc
 
 srckit: srckit-std
 

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

File Makefile.GNU

+# 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 *****
 
-Version 0.9.8
+Version 0.9.9
 
-This file Copyright 1998 Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp>.
+This file Copyright 1998, 2002 Free Software Foundation, Inc.
 
-The edict.el package is Copyright 1991, 1992 Per Hammarlund 
-  <perham@nada.kth.se> and 1998 Stephen J. Turnbull
-  <turnbull@sk.tsukuba.ac.jp>.
+The edict.el package is Copyright 1991, 1992 Per Hammarlund
+  <perham@nada.kth.se>, 1992 Bob Kerns <rwk@crl.dec.com>, and 1998, 2002
+  Free Software Foundation, Inc.
 
 Individual files may have their own Copyrights differing from the above.
 
 
 Original author:  Per Hammarlund <perham@nada.kth.se>
 Other authors:    Bob Kerns <rwk@crl.dec.com>
-                  Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp>
+                  Stephen J. Turnbull <stephen@xemacs.org>
 
-Adapted-by:  Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp> for XEmacs
-Maintainer:  Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp>
+Adapted-by:  Stephen J. Turnbull <stephen@xemacs.org> for XEmacs
+Maintainer:  Stephen J. Turnbull <stephen@xemacs.org>
 
 ***** Whatzit? *****
 
 Japanese word to a list of dictionary forms (eg, itta -> (iku, iu)),
 all of which are looked up.
 
+***** NEWS *****
+
+Version 0.9.9
+
+You can now use the Customize interface (in the 'edict subgroup of the
+'mule group) to set variables.
+
+An experimental automated update function is partially implemented,
+but already useful.  `update-edict' uses wget to fetch the current
+version(s) of the edict dictionary(ies) you use from the Monash
+University Nihongo archive, or a user-specified mirror.
+
+Version 0.9.8
+
 After several years of service, it became partially incompatible with
-recent FSF Emacsen, especially the keymaps and the byte compiler, and
+recent GNU 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
 
 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.)
+file extension .096.  (This numbering is unrelated to the numbering of
+XEmacs packages.)
 
 ***** Installation *****
 
+For XEmacs >= 21.1, use the package user interface.
+
 For XEmacs >= 20.3, get edict-<version>-pkg.tar.gz from
 
-    http://turnbull.sk.tsukuba.ac.jp/Tools/XEmacs/packages/edict/
+	       ftp://ftp.emacs.org/pub/xemacs/packages/
 
-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
+and untar it in the the directory ~/.xemacs (or top directory of your
+package hierarchy).  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
+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.
+edictj.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'.)
+For mainline GNU Emacs >= 20.1, get edict-<version>-pkg.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.9 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;
+If you have special needs, the package sources are available by CVS,
+see http://cvs.xemacs.org/.  Makefile is very XEmacs (>=20) specific;
+Makefile.GNU is provided for building for the FSF's distribution of
+Emacs.  Mainline GNU 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.
 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
+Emacs.  This file is automatically consulted by XEmacs; users of
+mainline GNU Emacs should be able to use it by adding
 
       (load-file "<path-to>/site-lisp/edict/auto-autoloads.el")
 
 
 ***** Usage *****
 
-Note: experience with dui indicates that it's not a very good
-interface, at least with the current keymap.  Experimentation and
-comments are very welcome, of course.
-
 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
 
 ***** Bug reports, comments, and feature requests *****
 
-Please send these to "Stephen Turnbull" <turnbull@sk.tsukuba.ac.jp>.
+Please send these to "Stephen Turnbull" <stephen@xemacs.org>.
 
 Bug reports are of course of high priority, but I am hoping that users 
 will also report inflections and idioms that the morphology engine
     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
+3.  To conform with Makefile.GNU need to make default
     edict-dictionary-path point to .../emacs/site-lisp/edict.
 4.  edict-standin does (aref i global-map)
 
     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.
+2.  GNU Emacs 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
 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
+6.  Figure out how to handle both GNU Emacs's functionality and XEmacs's
     functionality portably
 7.  Use VM's tapestry.el to track window configuration, or borrow
     from view-process-mode.el.

File dui-registry.el

 ;;; dui-registry.el --- Registry of dui dictionary methods
 
-;; Copyright (C) 1998 by Stephen J. Turnbull
+;; Copyright (C) 1998 Free Software Foundation
 
-;; Author:      Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp>
+;; Author:      Stephen J. Turnbull <stephen@xemacs.org>
 ;; Keywords:    mule, dictionary
 ;; Version:     0.6
 
 
 ;;; Changelog:
 
-;; 1998-04-08  Stephen Turnbull  <turnbull@sk.tsukuba.ac.jp>
+;; 1998-04-08  Stephen Turnbull  <stephen@xemacs.org>
 ;;        (created):  broken out from edict.el
 
 ;;; Code:
 ;;; dui.el --- Dictionary user interface
 
-;; Copyright (C) 1998 by Stephen J. Turnbull
+;; Copyright (C) 1998, 2002 Free Software Foundation, Inc.
 
-;; Author:      Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp>
+;; Author:      Stephen J. Turnbull <stephen@xemacs.org>
 ;; Keywords:    mule, dictionary
 ;; Version:     0.6
 
 
 ;;; Changelog:
 
-;; 1998-03-27  Stephen Turnbull  <turnbull@sk.tsukuba.ac.jp>
+;; 1998-03-27  Stephen Turnbull  <stephen@xemacs.org>
 ;;        (created):  broken out from monolithic edict.el
 
 ;;; Code:
 
 ;; User customization variables
 
+(defgroup dl nil
+  "Customization group for dl-mode interface to edict.el."
+  :group 'edict)
+
+;; #### Customize me later!
 (defvar dl-mode-prefix '[(control ?c) (?\$)]
-  "Prefix key sequence for dl-mode command keys.
+  "*Prefix key sequence for dl-mode command keys.
 
 After loading, change the mode's prefix by using dl-mode-set-prefix;
 setq'ing this variable can't work.")
 
-(defvar dl-indicator-string " dl"
-  "String indicating activation of dl minor mode in the modeline.
+(defcustom dl-mode-line-string " dl"
+  "*String indicating activation of dl minor mode in the modeline.
 
-Set to nil to inhibit modeline display.")
+Set to nil to inhibit modeline display."
+  :type '(choice string
+		 (const :tag "none" nil))
+  :group 'dl)
 
 ;; A convention for modes; here honored by observance, not breach.
 ;;
 (defvar dl-mode-hook nil
-  "A normal hook called at the end of the dl-mode activation process.
+  "*A normal hook called at the end of the dl-mode activation process.
 
 If you can think of a use for this, you're more clever than I.")
 
 ;; Auxiliary customizations
 
-(defvar dl-conflict-warning "Binding conflict: %s -> %s."
-  "Format string warning about key sequences with conflicting bindings.
+(defcustom dl-conflict-warning "Binding conflict: %s -> %s."
+  "*Format string warning about key sequences with conflicting bindings.
 
 Must contain two `%s' descriptors.  The first formats the key sequence,
-the second the description of the existing binding.")
+the second the description of the existing binding."
+  :type 'string
+  :group 'dl)
 
-(defvar dl-warn-conflict-verbosity 3
-  "Controls verbosity of binding conflict warnings.
+;; #### Add code to check that the level is OK?
+(defcustom dl-warn-conflict-verbosity 3
+  "*Controls verbosity of binding conflict warnings.
 
 0   turns off warnings entirely.
 1   issues a warning for each binding conflict (including sub-keymaps).
     sub-keymaps, only keys in those maps that have conflicts).
 3   adds verbose detail about what is being done.
 
-Each positive level performs all actions of lower levels.")
+Each positive level performs all actions of lower levels."
+  :type 'integer
+  :group 'dl)
 
 ;; The basic mode conventions.
 
 ;; `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)))
+	  (cons (list 'dl-mode dl-mode-line-string) minor-mode-alist)))
 (dl-mode-set-prefix dl-mode-prefix)
 
 ;;; end of dictionary lookup minor mode
 
-(defvar dui-warn-previously-registered-methods-p t
-  "Warn about previously registered methods.")
+(defcustom dui-warn-previously-registered-methods-p t
+  "*Warn about previously registered methods."
+  :type 'boolean
+  :group 'dl)
 
 ;;     [SJT:  OK, ispell uses M-$, and LEIM and Wnn both use C-\.  I see
 ;;	all three processes (spell-check, localized input methods, and
 ;string describing this method, INVOCATION is a function to call to
 ;invoke this method, and the function will be applied to (cons TYPE
 ;ARGS).
+;; #### a custom interface might be nice
 (defvar dui-method-alist nil
-  "Registry of dictionary methods and utilities.
+  "*Registry of dictionary methods and utilities.
 
 An alist containing elements of the form (METHOD TYPE DESCRIPTION
 INVOCATION &rest ARGS).
 (defun dui-get-method-invocation (slot) (nth 3 slot))
 (defun dui-get-method-args (slot) (nthcdr 4 slot))
 
-(defvar dui-registration-errors nil
+;; Flush any old errors hanging around on reload.
+(defconst dui-registration-errors nil
   "String containing description of method registration problems.")
 
-;; Flush any old errors hanging around.
-(setq dui-registration-errors nil)
-
 (defun dui-register-method
   (method type invocation description &rest args)
   "Register a dictionary method.

File edict-edit.el

 ;;; edict-edit.el --- Edit an EDICT dictionary.
 
 ;; Copyright (C) 1991, 1992 Per Hammarlund (perham@nada.kth.se)
+;; Copyright (C) 1998, 2002 Free Software Foundation, Inc.
 
 ;; Author:      Per Hammarlund <perham@nada.kth.se>
 ;; Keywords:    mule, edict, dictionary
-;; 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>
+;; Version:     0.9.9
+;; Adapted-by:  Stephen J. Turnbull <stephen@xemacs.org> for XEmacs
+;; Maintainer:  Stephen J. Turnbull <stephen@xemacs.org>
 
 ;;   This file is part of XEmacs.
 
 
 ;;; Customizable variables
 
-(defvar edict-use-electric-henkan nil
-  "Determines whether to use electric henkan mode in edict buffers.
+;; #### does this tristate make sense with Customize support?
+(defcustom edict-use-electric-henkan nil
+  "*Determines whether to use electric henkan mode in edict buffers.
 
-If t, use it; if nil, don't use it.  If 'ask, ask and (re)set the flag.")
+If t, use it; if nil, don't use it.  If 'ask, ask and (re)set the flag."
+  :type '(choice (const :tag "yes" t)
+		 (const :tag "no" nil)
+		 (const :tag "ask and set flag for this session" ask))
+  :group 'edict)
 
-(defvar edict-verbose-electric-henkan t
-  "If non-nil, warns the user of electric changes in henkan state.")
+(defcustom edict-verbose-electric-henkan t
+  "*If non-nil, warns the user of electric changes in henkan state."
+  :type 'boolean
+  :group 'edict)
+
+(defcustom *brackets-allowed-in-english* nil
+  "*Allow brackets in the english section of dictionary entries, if non-null."
+  :type 'boolean
+  :group 'edict)
 
 ;;; Internal variables
 
 	    (re-search-forward "/[^/\n]+/" end t)
 	  (re-search-forward "/" end t))))))
 
-(defvar *brackets-allowed-in-english* nil
-  "*Allow brackets in the english section of dictionary entries, if non-null.")
-
 (defun edict-open-bracket ()
   "Begin editing the yomi section of the entry, at the beginning of the entry.
 Self-inserts if in the english section."

File edict-english.el

 ;;; edict-english.el --- English morphology rules for edict.el
 
 ;; Copyright (C) 1991, 1992 Per Hammarlund (perham@nada.kth.se)
+;; Copyright (C) 1998 Free Software Foundation, Inc.
 
 ;; Author:      Per Hammarlund <perham@nada.kth.se>
 ;; Keywords:    mule, edict, dictionary
-;; 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>
+;; Version:     0.9.9
+;; Adapted-by:  Stephen J. Turnbull <stephen@xemacs.org> for XEmacs
+;; Maintainer:  Stephen J. Turnbull <stephen@xemacs.org>
 
 ;;   This file is part of XEmacs.
 
 
 ;;; Changelog:
 
-;; 1998-03-27  Stephen Turnbull  <turnbull@sk.tsukuba.ac.jp>
+;; 1998-03-27  Stephen Turnbull  <stephen@xemacs.org>
 ;;        (created):  broken out from monolithic edict.el
 
 ;;; Code:

File edict-japanese.el

 ;;; edict-japanese.el --- Japanese morphology rules for edict.el
 
 ;; Copyright (C) 1991, 1992 Per Hammarlund (perham@nada.kth.se)
+;; Copyright (C) 1998 Free Software Foundation, Inc.
 
 ;; Author:      Per Hammarlund <perham@nada.kth.se>
 ;; Keywords:    mule, edict, dictionary
-;; 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>
+;; Version:     0.9.9
+;; Adapted-by:  Stephen J. Turnbull <stephen@xemacs.org> for XEmacs
+;; Maintainer:  Stephen J. Turnbull <stephen@xemacs.org>
 
 ;;   This file is part of XEmacs.
 
 
 ;;; Changelog:
 
-;; 1998-03-27  Stephen Turnbull  <turnbull@sk.tsukuba.ac.jp>
+;; 1998-03-27  Stephen Turnbull  <stephen@xemacs.org>
 ;;        (created):  broken out from monolithic edict.el
 
 ;;; Code:

File edict-morphology.el

 ;;; edict-morphology.el --- morphology rewrite engine for edict.el
 
+;; Copyright (C) 1992 Bob Kerns <rwk@crl.dec.com>
 ;; Copyright (C) 1991, 1992 Per Hammarlund (perham@nada.kth.se)
+;; Copyright (C) 1998, 2002 Free Software Foundation, Inc.
 
 ;; Author:      Per Hammarlund <perham@nada.kth.se>
 ;; Keywords:    mule, edict, dictionary
-;; 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>
+;; Version:     0.9.9
+;; Adapted-by:  Stephen J. Turnbull <stephen@xemacs.org> for XEmacs
+;; Maintainer:  Stephen J. Turnbull <stephen@xemacs.org>
 
 ;;   This file is part of XEmacs.
 
 
 ;;; Changelog:
 
-;; 1998-03-27  Stephen Turnbull  <turnbull@sk.tsukuba.ac.jp>
+;; 1998-03-27  Stephen Turnbull  <stephen@xemacs.org>
 ;;        (created):  broken out from monolithic edict.el
 
 ;;; Code:
 
 (require 'cl)				; for defstruct
 
+;; Set this to true for debugging.
+(defvar *edict-expand-string-trace* nil)  
+
 ;;; Constants:
 
 ;; The edict-category-* variables are used to emulate the character
 	  (throw 'exit (aref b to))))
     (throw 'skip-rule nil)))
 
-;; Set this to true for debugging.
-(defvar *edict-expand-string-trace* nil)  
-
 ;; This returns a list of the results of applying all rules whose
 ;; patterns match, to all levels of recursion.
 (defun edict-expand-string (string &optional others previous syntax)

File edict-update.el

+;; edict-update.el --- Dictionary update functions for edict.el
+
+;; Copyright (C) 2002 Free Software Foundation, Inc.
+
+;; Author:      Stephen J. Turnbull <stephen@xemacs.org>
+;; Keywords:    mule, edict, dictionary
+;; Version:     0.5
+;; Created:     27 January 2002
+;; Last Update: 27 January 2002
+;; Maintainer:  Stephen J. Turnbull <stephen@xemacs.org>
+
+;;   This file is part of XEmacs.
+
+;;   XEmacs 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.
+
+;;; Commentary:
+
+;; Functions to update EDICT dictionaries and to report private dictionary
+;; words upstream.
+
+;; Usage:
+
+;; Customize `edict-dictionary-path', `edict-dictionaries',
+;; `edict-update-file-list', `edict-update-staging',
+;; `edict-update-local-mirror', and `edict-update-archive-url'
+;; appropriately.  Then "M-x edict-update RET" and if you're lucky,
+;; you're done.
+
+;; TODO:
+
+;; 1. Use the package transport stuff I wrote; test it here.
+;; 2. Think carefully about the process of updating packages.  The
+;;    problem is that there should be a difference between updates
+;;    done by administrators and updates done by ordinary users.  The
+;;    administrators should update the main hierarchies, while the
+;;    users should update their personal packages.  This probably
+;;    involves checking for write permission and/or ownership on the
+;;    package hierarchy and possibly some kind of "su.el"
+;;    functionality.
+
+;;; Code
+
+(require 'edict)			; for dictionary list and path
+
+;;; User customization
+
+(defgroup edict-update nil
+  "Customization of functions used to keep your EDICT current."
+  :group 'edict)
+
+(defcustom edict-update-file-list nil
+  "List of files to update.
+
+If nil, default to the value of `edict-dictionaries'."
+  ;; #### should default to something else for package administrators,
+  ;; like all known edict dictionaries.
+  :type '(repeat file)
+  :group 'edict-update)
+
+(defcustom edict-update-staging "/tmp/edict"
+  "Basename of temporary directory for staging EDICT dictionary archives.
+
+Should not end in a slash, because it will be used to generate a unique
+name for a directory to be created.  The directory is deleted after use.
+
+If `edict-update-local-mirror' is non-nil, this variable is ignored."
+  :type 'file				; not directory
+  :group 'edict-update)
+
+(defcustom edict-update-local-mirror nil
+  "Path to a local mirror of the EDICT dictionary archives.
+
+Files downloaded here are persistent.  This location takes precedence
+over `edict-update-staging'."
+  :type '(choice directory
+		 (const :tag "none" nil))
+  :group 'edict-update)
+
+(defcustom edict-update-archive-url
+  "ftp://ftp.cc.monash.edu.au/pub/nihongo/"
+  "URL pointing to a host and directory serving EDICT dictionaries.
+
+Should end with a slash.
+
+Default is Jim Breen's Nihongo Archive at Monash University,
+ftp://ftp.cc.monash.edu.au/pub/nihongo/."
+  ;; WE DEMAND AN URL WIDGET!!
+  :type 'string
+  :group 'edict-update)
+
+(defcustom edict-update-sources-alist
+  '(("edict" "edict.gz")
+    ("kanjidic" "kanjidic.gz")
+    ("enamdict" "enamdict.gz"))
+  "Map dictionaries to archive name to download.
+
+This isn't really a user customization (should be constant over time and
+for different mirrors), but made customizable for convenience."
+  :type '(repeat (list string string))
+  :group 'edict-update)
+
+;; #### Evile temporary hack
+(defvar edict-update-wget-options "-N")
+
+;;; Implementation
+
+;;;###autoload
+(defun edict-update ()
+  "Update edict dictionaries from archives on the 'Net.
+
+Customize `edict-dictionary-path', `edict-dictionaries',
+`edict-update-file-list', `edict-update-staging',
+`edict-update-local-mirror', and `edict-update-archive-url' to
+determine how and where to download and install.
+
+#### Currently not at all robust, requires wget on the path." 
+
+  (interactive)
+
+  (let ((stage (edict-update-setup-stage))
+	(destination (file-name-as-directory (car edict-dictionary-path)))
+	(sources edict-update-sources-alist)
+	(files (or edict-update-file-list edict-dictionaries)))
+    ;; #### provide for alternative transports
+    (mapc (lambda (source)
+	    (when (member (first source) files)
+	      ;; #### this is very fragile
+	      (shell-command
+	       (concat "cd " stage "; "
+		       "wget " edict-update-wget-options " "
+		       edict-update-archive-url (second source)))
+	      (shell-command
+	       (concat "cd " stage "; "
+		       (if edict-update-local-mirror "cp " "mv ")
+		       (second source) " " destination))
+	      (when (string-match "\\.gz$" (second source))
+		(shell-command
+		 (concat "cd " destination "; " "gunzip " (second source))))))
+	  sources)
+    (edict-update-cleanup-stage)))
+
+;; staging area utilities
+
+(defun edict-update-setup-stage ()
+  "Determine staging directory, and create it if needed."
+
+  ;; #### do proper temporary creation
+  (or edict-update-local-mirror
+      (if (file-exists-p edict-update-staging)
+	  (error "%s exists, move it out of the way, please"
+		 edict-update-staging)
+	(make-directory edict-update-staging t)
+	edict-update-staging)))
+
+(defun edict-update-cleanup-stage ()
+  "Clean up downloaded files and remove temporary staging area."
+
+  (unless edict-update-local-mirror
+    (remove-directory edict-update-staging)))
+
+(provide 'edict-update)
+
+;;; edict-update.el ends here
 ;; edict.el --- Word lookup (with deinflection) in EDICT
 
 ;; Copyright (C) 1991, 1992 Per Hammarlund (perham@nada.kth.se)
+;; Copyright (C) 1998, 2002 Free Software Foundation, Inc.
 
 ;; Author:      Per Hammarlund <perham@nada.kth.se>
 ;; Keywords:    mule, edict, dictionary
-;; 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>
+;; Version:     0.9.9
+;; Adapted-by:  Stephen J. Turnbull <stephen@xemacs.org> for XEmacs
+;; Maintainer:  Stephen J. Turnbull <stephen@xemacs.org>
 
 ;;   This file is part of XEmacs.
 
 
 ;;; Commentary:
 
-;; Some code that looks for translations of english and japanese using the
-;; EDICTJ Public Domain japanese/english dictionary.
+;; Search for translations of English or Japanese terms in Jim Breen's
+;; EDICT free Japanese/English dictionary.
+
+;; GNU Emacs-compatible editors including GNU Emacs versions 20 and 21
+;; and XEmacs versions 20 and 21 when configured with Mule are supported.
+;; This version is packaged for easy installation and management in XEmacs
+;; versions 21 and above.
 
 ;; Written by Per Hammarlund <perham@nada.kth.se>
 ;; Morphology and private dictionary handling/editing 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>
+;; The EDICT dictionary is maintained by Jim Breen <jwb@monu6.cc.monash.edu.au>
 
 ;; Short getting started guide, this assumes that you have not used
 ;; the install script and that you understand the "technical" words
 ;; used, if you don't, please read the documentation in edict.doc:
 
+;; 0. You need a *Japanese-capable Emacs*.  Previous versions of this package
+;;    worked with NEmacs and Emacs with the Mule patchkit, but it is unknown
+;;    whether this version does.  They are not supported, but if you must use
+;;    early versions feel free to ask the maintainers for help.
+;;    You need a *recent version of Per Abrahamsen's "Customize" library."
+;;    You can work around by changing all the `defcustom' calls to `defvar'
+;;    
 ;; 1. Make sure that you have placed edict.el in a directory that is
 ;;    included in the nemacs's search path, look at the variable
 ;;    "load-path" to make sure that the directory is in that list.
 ;;
 ;; A full ChangeLog is provided as a separate file.
 ;;
-;;      0.9.8          FSF and XEmacs-21 compatibility release
+;;      0.9.8          GNU Emacs and XEmacs 21 compatibility release
 ;;      0.9.7          XEmacs-beta beta release
 ;;	0.9.6-sjt-0.1  Modifications provided by Steven Baur and Olivier
 ;;		       Galibert to get it to compile; the character
 
 ;;; Code:
 
+;;; User customization
+
+(defgroup edict nil
+  "Per Hammarlund's edict.el interface to Jim Breen's EDICT,
+an English-Japanese dictionary."
+  :group 'mule)
+
 ;; Require standard XEmacs packages.
 
 (require 'cl)
 
 ;;; Variables:
 
-(defvar edict-version-date "980524 [$BJ?@.(B10$BG/(B5$B7n(B24$BF|(B($BLZ(B)]"
+(defconst edict-version-date "980524 [$BJ?@.(B10$BG/(B5$B7n(B24$BF|(B($BLZ(B)]"
   "The variable edict-version-date contains a string with the
 date when this version was released.  In both Swedish and Japanese
 standards.")
 
-(defvar edict-version "0.9.8"
+(defconst edict-version "0.9.8"
  "The variable edict-version contains a string that describes
  what version of the edict software that you are running.")
 
-(defvar edict-default-coding-system 'euc-jp
+(defcustom edict-default-coding-system 'euc-jp
   "Default coding system for reading dictionary files.
 
 On Unix systems, EDICT is distributed as an EUC file.  For Windows systems
-'shift_jis is may be preferable.")
+'shift_jis is may be preferable."
+  :type 'symbol
+  :group 'edict)
 
-(defvar edict-user-dictionary "~/.edict"
+(defcustom edict-user-dictionary "~/.edict"
   "*This is the edict dictionary where the user's entries will be added.
 
 May be a string (filename), or a cons of a filename and a symbol
-(coding system).  Will be searched first in dictionary lookup.")
+\(coding system).  Will be searched first in dictionary lookup."
+  :type '(choice file (cons file symbol))
+  :group 'edict)
 
-;; Search paths and how to create them vary by Emacs version.
-;; This is really ugly.
-(defvar edict-dictionary-path
-  (let (path)
-    (cond
-     ;; XEmacs 21
-     ((and (fboundp 'locate-data-directory)
-	   (setq path (cond ((locate-data-directory "edict"))
-			    ((locate-data-directory ""))))))
-     ;; the FSF's Emacs and XEmacs 20
-     (t (dolist (dir
-		 ;; Use data-directory and package-path
-		 (cons data-directory
-		       ;; early betas of XEmacs 21 and betas of XEmacs 20.3
-		       ;; and 20.4 used package-path; "undocumented
-		       ;; feature" in 20.3 and 20.4 releases
-		       (mapcar
-			;; nil components of package-path stay nil
-			(lambda (dir) (if dir
-					  ;; don't add package roots
-					  (concat dir "etc/")))
-			(reverse (if (boundp 'package-path) package-path))))
-		 path)
-	  (if (and dir			; drop nil components of package-path
-		   (eq (car (file-attributes dir)) t))
-	      (progn (setq path (cons dir path))
-		     (let ((file (expand-file-name "edict" dir)))
-		       (if (eq (car (file-attributes file)) t)
-			   (setq path (cons file path)))))))))
-    (cond ((stringp path) (list path))
-	  ((null path)
-	   (message "Couldn't compute default for `edict-dictionary-path'!")
-	   nil)
-	  ((listp path) path)
-	  (t (message
-	      "Error in computing default for `edict-dictionary-path'!"))))
-  "Search path for edict dictionaries.
+;; Search paths
+(defcustom edict-dictionary-path nil
+  "List of directories to search for edict dictionaries.
 
-The default value is the edict subdirectory of the package data-directory,
-or if that is missing the package data-directory.  Computed using
-`locate-data-directory' if available, or `package-path' (if available)
-and `data-directory'.
+The default value contains only the edict subdirectory of the package
+data-directory, or if that is missing the package data-directory itself.
+Computed using `locate-data-directory' if available, or `package-path' (if
+available) and `data-directory'.
 
-Will not find `<package-root>/<package>/etc'-style data directories.")
+Will not find `<package-root>/<package>/etc'-style data directories."
+  :type '(repeat directory)
+  ;; How to create them vary by Emacs version.
+  ;; This is really ugly.
+  :initialize
+  (lambda (symbol ignored)
+    (unless (default-boundp symbol)
+      (set-default symbol
+        (let (path)
+	  (cond
+	   ;; XEmacs 21
+	   ((and (fboundp 'locate-data-directory)
+		 (setq path (cond ((locate-data-directory "edict"))
+				  ((locate-data-directory ""))))))
+	   ;; GNU Emacs and XEmacs 20
+	   (t (dolist
+		  (dir
+		   ;; Use data-directory and package-path
+		   (cons data-directory
+			 ;; early betas of XEmacs 21 and betas of XEmacs 20.3
+			 ;; and 20.4 used package-path; "undocumented
+			 ;; feature" in 20.3 and 20.4 releases
+			 (mapcar
+			  ;; nil components of package-path stay nil
+			  (lambda (dir) (if dir
+					    ;; don't add package roots
+					    (concat dir "etc/")))
+			  (reverse (if (boundp 'package-path) package-path))))
+		   path)
+		(if (and dir		; drop nil components of package-path
+			 (eq (car (file-attributes dir)) t))
+		    (progn (setq path (cons dir path))
+			   (let ((file (expand-file-name "edict" dir)))
+			     (if (eq (car (file-attributes file)) t)
+				 (setq path (cons file path)))))))))
+	  (cond
+	   ((stringp path) (list path))
+	   ((null path)
+	    (message
+	     "Couldn't compute default for `edict-dictionary-path'!")
+	    nil)
+	   ((listp path) path)
+	   (t (message
+	       "Error in computing default for `edict-dictionary-path'!")))))))
+  :group 'edict)
 
-(defvar edict-dictionaries '("edict")
+(defcustom edict-dictionaries '("edict")
   "*List of edict dictionary specifications.
 
 A dictionary specification is either a string (file name), or a cons
 
 The up-to-date versions of these dictionaries are all available from
 ftp://ftp.monash.edu.au/pub/nihongo.  A very small sample dictionary,
-edictj.demo, is provided with this package.")
+edictj.demo, is provided with this package."
+  :type '(choice string (cons string symbol))
+  :group 'edict)
 
+;;The edict dictionary buffer and its name
 (defvar edict-buffer nil
   "The buffer containing the concatenated dictionaries.")
+(defcustom edict-buffer-name "*edict*"
+  "The name of `edict-buffer', default \"*edict*\"."
+  :type 'string
+  :group 'edict)
 
-(defvar edict-buffer-name "*edict*"
-  "The name of `edict-buffer'.")
-
-;;The edict matches buffer and the name of it
-(defvar edict-match-buffer-name "*edict matches*")
-(defvar edict-match-buffer nil)
+;;The edict matches buffer and its name
+(defvar edict-match-buffer nil
+  "The buffer displaying search results.")
+(defcustom edict-match-buffer-name "*edict matches*"
+  "The name of `edict-match-buffer', default \"*edict matches*\"."
+  :type 'string
+  :group 'edict)
 
 ;; #### is this appropriate?
 ;;;###autoload
    (message (concat "Edict version " edict-version  " of " edict-version-date)))
 
 ;; Marker so we can find the individual files in the buffer.
-(defvar *edict-file-begin-marker* "<<<<<<<<<<<<<<<<")
-(defvar *edict-file-end-marker* ">>>>>>>>>>>>>>>>")
+(defconst *edict-file-begin-marker* "<<<<<<<<<<<<<<<<")
+(defconst *edict-file-end-marker* ">>>>>>>>>>>>>>>>")
 
 ;; This is the set of characters to be ignored in the middle of kanji
 ;; words being looked up.
 ;;	possibly with a customizable option to reverse the sense of
 ;;	the arg.
 
-(defvar *edict-kanji-whitespace* "$B!!(B-$B!:!=(B-$B"`(B \n\t>;!:#?,.\"/@$B(!(B-$B(@(B")
+(defconst *edict-kanji-whitespace* "$B!!(B-$B!:!=(B-$B"`(B \n\t>;!:#?,.\"/@$B(!(B-$B(@(B")
 
 ;; This is the set of characters to be ignored in the middle of english
 ;; words being looked up.
 ;; in the regexp code.
 ;; #### Maybe it's better to filter for `not-eigo'?  Check the code.
 
-(defvar *edict-eigo-whitespace* "$B!!(B-$B!:!=(B-$B"`(B \n\t>;!:#?,.\"/@$B(!(B-$B(@(B")
+(defconst *edict-eigo-whitespace* "$B!!(B-$B!:!=(B-$B"`(B \n\t>;!:#?,.\"/@$B(!(B-$B(@(B")
 
 ;; #### This possibly is not correct as it will miss hyphenated words.
 ;; #### Can we just steal from ispell?
-(defvar *edict-eigo-characters* "[A-Za-z$B#A(B-$B#Z#a(B-$B#z(B]"
+(defconst *edict-eigo-characters* "[A-Za-z$B#A(B-$B#Z#a(B-$B#z(B]"
   "These are the characters that eigo is made up of.")
 
 ;; #### These errors should be warnings.
-(defvar *edict-unreadable-error*
+(defconst *edict-unreadable-error*
   "Edict file \"%s\": doesn't exist or isn't readable!")
 
 ;(defvar *edict-non-existent-error*
 (defconst edict-bad-dict-spec
   "In edict-dictionaries: %s - not string or cons.")
 
-(defvar edict-warn-missing-dictionaries-p t
-  "Warn about dictionaries specified in edict-dictionaries but not found.")
+(defcustom edict-warn-missing-dictionaries-p t
+  "Warn about dictionaries specified in edict-dictionaries but not found."
+  :type 'boolean
+  :group 'edict)
 
 (defvar edict-missing-dictionaries nil
   "List of dictionaries not found at initialization.")
 	   (if (not (and (stringp (setq filename (car dict-spec)))
 			 (coding-system-p
 			  (setq coding-system
-				;; #### no `find-coding-system' in FSF's Emacs
+				;; #### no `find-coding-system' in GNU Emacs
 				(if (fboundp 'find-coding-system)
 				    (find-coding-system (cdr dict-spec))
 				  (cdr dict-spec))))))
       (setq loc (setq start (match-end 0))))
     (concat result (substring key loc))))
 
-;; #### Why isn't this a defconst?  Why strings and not characters?
-(defvar *edict-romaji-remaps* nil)
-(setq *edict-romaji-remaps* 
-      '(("$B#a(B" . "a") ("$B#b(B" . "b") ("$B#c(B" . "c") ("$B#d(B" . "d") ("$B#e(B" . "e") ("$B#f(B" . "f") ("$B#g(B" . "g")
-	("$B#h(B" . "h") ("$B#i(B" . "i") ("$B#j(B" . "j") ("$B#k(B" . "k") ("$B#l(B" . "l") ("$B#m(B" . "m")
-	("$B#n(B" . "n") ("$B#o(B" . "o") ("$B#p(B" . "p") ("$B#q(B" . "q") ("$B#r(B" . "r") ("$B#s(B" . "s") ("$B#t(B" . "t")
-	("$B#u(B" . "u") ("$B#v(B" . "v") ("$B#w(B" . "w") ("$B#x(B" . "x") ("$B#y(B" . "y") ("$B#z(B" . "z")
-	("$B#A(B" . "A") ("$B#B(B" . "B") ("$B#C(B" . "C") ("$B#D(B" . "D") ("$B#E(B" . "E") ("$B#F(B" . "F") ("$B#G(B" . "G")
-	("$B#H(B" . "H") ("$B#I(B" . "I") ("$B#J(B" . "J") ("$B#K(B" . "K") ("$B#L(B" . "L") ("$B#M(B" . "M")
-	("$B#N(B" . "N") ("$B#O(B" . "O") ("$B#P(B" . "P") ("$B#Q(B" . "Q") ("$B#R(B" . "R") ("$B#S(B" . "S") ("$B#T(B" . "T")
-	("$B#U(B" . "U") ("$B#V(B" . "V") ("$B#W(B" . "W") ("$B#X(B" . "X") ("$B#Y(B" . "Y") ("$B#Z(B" . "Z")))
+;; #### Why strings and not characters?
+(defconst *edict-romaji-remaps*
+  '(("$B#a(B" . "a") ("$B#b(B" . "b") ("$B#c(B" . "c") ("$B#d(B" . "d") ("$B#e(B" . "e") ("$B#f(B" . "f") ("$B#g(B" . "g")
+    ("$B#h(B" . "h") ("$B#i(B" . "i") ("$B#j(B" . "j") ("$B#k(B" . "k") ("$B#l(B" . "l") ("$B#m(B" . "m")
+    ("$B#n(B" . "n") ("$B#o(B" . "o") ("$B#p(B" . "p") ("$B#q(B" . "q") ("$B#r(B" . "r") ("$B#s(B" . "s") ("$B#t(B" . "t")
+    ("$B#u(B" . "u") ("$B#v(B" . "v") ("$B#w(B" . "w") ("$B#x(B" . "x") ("$B#y(B" . "y") ("$B#z(B" . "z")
+    ("$B#A(B" . "A") ("$B#B(B" . "B") ("$B#C(B" . "C") ("$B#D(B" . "D") ("$B#E(B" . "E") ("$B#F(B" . "F") ("$B#G(B" . "G")
+    ("$B#H(B" . "H") ("$B#I(B" . "I") ("$B#J(B" . "J") ("$B#K(B" . "K") ("$B#L(B" . "L") ("$B#M(B" . "M")
+    ("$B#N(B" . "N") ("$B#O(B" . "O") ("$B#P(B" . "P") ("$B#Q(B" . "Q") ("$B#R(B" . "R") ("$B#S(B" . "S") ("$B#T(B" . "T")
+    ("$B#U(B" . "U") ("$B#V(B" . "V") ("$B#W(B" . "W") ("$B#X(B" . "X") ("$B#Y(B" . "Y") ("$B#Z(B" . "Z")))
 
 ;;
 ;; Lookup a mapping for zenkaku roman characters to ASCII.
       (setq *edict-previous-configuration* (current-window-configuration))))
 
 ;; This doesn't work yet; leave it set to 'top!
-(defvar *edict-window-location* 'top
+(defcustom *edict-window-location* 'top
   "*Location to place edict matches window.  top or bottom.
-Doesn't work yet.")
+Doesn't work yet."
+  :type '(const top)
+  :group 'edict)
 
 (defun edict-display (key-list match-list)
   "Edict-display displayes the strings in a separate window that is
       ;; split the space among several windows.
       (if (featurep 'xemacs)
 	  (delete-window window)
-	;; #### The following code is _not_ known to work in recent FSF Emacs :-(
+	;; #### The following is _not_ known to work in recent GNU Emacs :-(
 	(let* ((selected (selected-window))
 	       (next (previous-window window))
 	       (height (window-height window))
 ;;; ts-mode.el --- Insert time-stamps in buffers
 
-;; Copyright (C) 1998 by Stephen J. Turnbull
+;; Copyright (C) 1998, 2002 by Free Software Foundation, Inc.
 
-;; Author:      Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp>
+;; Author:      Stephen J. Turnbull <stephen@xemacs.org>
 ;; Keywords:    minor mode
 ;; Version:     1.0
 ;; Created:     Sun Apr  5 19:49:36 1998
 
 ;;; Changelog:
 
-;; 1998-04-05  Stephen Turnbull  <turnbull@sk.tsukuba.ac.jp>
+;; 1998-04-05  Stephen Turnbull  <stephen@xemacs.org>
 ;;        tm-mode.el:  created
 
 ;;; Code
 
 ;;; User customization variables
 
+;; #### Is this really worth cluttering up Customize with?
+;;(defgroup 'time-stamp nil)
+
+;; #### Provide Customize interface someday....
 (defvar ts-mode-prefix '[(control ?c) (?\$)]
-  "Prefix key sequence for ts-mode command keys.
+  "*Prefix key sequence for ts-mode command keys.
 
 After loading, change the mode's prefix by using ts-mode-set-prefix;
 setq'ing this variable can't work.")
 
 ;; A convention for modes; here honored by observance, not breach.
 (defvar ts-mode-hook nil
-  "If you can think of a use for this, you're more clever than I.")
+  "*If you can think of a use for this, you're more clever than I.")
 
 ;; Auxiliary customizations
 
-(defvar ts-conflict-warning "Binding conflict: %s -> %s."
-  "Format string warning about key sequences with conflicting bindings.
+(defcustom ts-conflict-warning "Binding conflict: %s -> %s."
+  "*Format string warning about key sequences with conflicting bindings.
 
 Must contain two `%s' descriptors.  The first formats the key sequence,
-the second the description of the existing binding.")
+the second the description of the existing binding."
+  :type 'string
+;  :group 'time-stamp
+  )
 
-(defvar ts-warn-conflict-verbosity 3
-  "Controls verbosity of binding conflict warnings.
+(defcustom ts-warn-conflict-verbosity 3
+  "*Controls verbosity of binding conflict warnings.
 
 0   turns off warnings entirely.
 1   issues a warning for each binding conflict (including sub-keymaps).
     sub-keymaps, only keys in those maps that have conflicts).
 3   adds verbose detail about what is being done.
 
-Each positive level performs all actions of lower levels.")
+Each positive level performs all actions of lower levels."
+  :type 'integer
+;  :group 'time-stamp
+  )
 
 ;;; The basic mode conventions.