(savehist-coding-system): Check XEmacs version.
(history-length): Declare also at run time.
(savehist-mode): Don't emit a message. Don't run the minor mode hook.
Don't set the customize state.
(savehist-minibuffer-hook): Special case for when
minibuffer-history-variable is equal to t.
(savehist-mode): New minor mode.
(savehist-file): Use ~/.emacs.d or ~/.xemacs if available.
(savehist-length): Remove (use history-length instead).
(savehist-file-modes): Rename from savehist-modes.
(savehist-save-hook, savehist-loaded): New vars.
(savehist-load): Use savehist-mode. Try to smooth up transition from
old format to new format.
(savehist-install): Allow savehist-autosave-interval to be nil.
(savehist-save): Run the new hook. Be more careful to only trim the
history variables.
(savehist-trim-history): New fun. Replaces savehist-process-for-saving.
(savehist-printable): Print into a buffer rather than char-by-char.
(savehist-history-variables): Remove.
(savehist-save-minibuffer-history, savehist-additional-variables)
(savehist-minibuffer-history-variables): New vars.
(savehist-save): Use them.
(savehist-uninstall, savehist-minibuffer-hook): New funs.
(savehist-install): New fun, extracted from savehist-load.
(savehist-load): Use them.
(savehist-xemacs): Remove.
(savehist-coding-system): Use utf-8 if available, regardless of religion.
(savehist-no-conversion): Use (featurep 'xemacs).
(savehist-load): Check existence of start-itimer rather than XEmacs.
Use an idle timer.
(savehist-process-for-saving): Replace use of CL funs `subseq' and
`delete-if-not'.
(savehist-last-checksum, savehist-no-conversion): New vars.
(savehist-autosave, savehist-process-for-saving, savehist-printable): New funs.
(savehist-load, savehist-save): Use them.
(savehist-delimit): Remove.